Solved Unattend - Disable UAC, Install Reg files, etc.

curtranhome

New member
Member
Local time
11:51 AM
Messages
48
Location
Sacramento CA
Hey everyone! I have a windows 7 install disc with an uninstall.xml file and it works perfectly! but I was wondering if there was a way to disable the user account control so that it's at the minimum settings? In addition to having the UAC disabled, I have some custom registry files that I would like to include during the install. Some of my custom registry files include custom login background (got from this forum), Empty Recycle Bin option in the right-click menu, as well as others. With the custom background, I can get the correct directory on the cd so that the script just needs to copy it from there and put it in the oobe folder on the C: drive. How do I do this to?

To sum everything up:

1. Set UAC to minimum settings
2. Install custom registry files
3. Copy custom login background directory to the oobe directory

All I need is some kind of batch file that the unattend can include in the startup and then have another one hidden somewhere to delete the startup script once it has done it's job.

What do you guys think?

Thanks,
~curt
 

My Computer My Computer

At a glance

Windows 8.1Intel i7 4790K 4.0GHz32 GBEVGA
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 8.1
CPU
Intel i7 4790K 4.0GHz
Motherboard
Asus Maximus VI Formula
Memory
32 GB
Graphics Card(s)
EVGA
Sound Card
On-Board Audio
Monitor(s) Displays
HP Pavilion 23xi
Screen Resolution
1920 x 1200
Hard Drives
1x 500GB SSD
1x 3TB HHDD
4x 1TB in 1+0 RAID
PSU
750W
Case
Antec
Cooling
4 Fans + Liquid Cooling System
Keyboard
Razer Black Widow Ultimate
Mouse
Logitech G700
Internet Speed
23 MB/s
Antivirus
Avast! Antivirus
Browser
Google Chrome

My Computer My Computer

At a glance

W 7 64-bit UltimateIntel Q9550 Yorkfield8GB Dominator 8500C5DATI : XFX 5870
Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack
This will disable the UAC

Code:
 <settings pass="offlineServicing">
        <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <EnableLUA>false</EnableLUA>
        </component>
    </settings>

   Note
Change processorArchitecture to x86 if its a 32 bit installation


   Tip
See if this will help
549m2q.png
 

My Computer My Computer

At a glance

Windows 7 Ultimate 32-Bit & Windows 7 Ultimat...Intel Core i7 CPU 950 @ 3.07GHzOCZ 6GB (3 x 2GB) 240-Pin DDR3 SDRAM DDR3 160...ATI Radeon HD 5700 Series
Computer Manufacturer/Model Number
Custom Built
OS
Windows 7 Ultimate 32-Bit & Windows 7 Ultimate 64-Bit
CPU
Intel Core i7 CPU 950 @ 3.07GHz
Motherboard
ASUS P6T DELUXE V2
Memory
OCZ 6GB (3 x 2GB) 240-Pin DDR3 SDRAM DDR3 1600 OCZ3X1600R2
Graphics Card(s)
ATI Radeon HD 5700 Series
Sound Card
OnBoard
Hard Drives
WD6400AACS-00M3B0 (640GB SATA )
PSU
CORSAIR 850w
Case
NZXT LEXA
Cooling
Intel Stock Heatsink Fan
Keyboard
Microsoft Wireless Laser Keyboard 7000
Mouse
Microsoft Wireless Laser Mouse 7000
RE:

So it would be amdx32 right or just x32?
 

My Computer My Computer

At a glance

Windows 8.1Intel i7 4790K 4.0GHz32 GBEVGA
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 8.1
CPU
Intel i7 4790K 4.0GHz
Motherboard
Asus Maximus VI Formula
Memory
32 GB
Graphics Card(s)
EVGA
Sound Card
On-Board Audio
Monitor(s) Displays
HP Pavilion 23xi
Screen Resolution
1920 x 1200
Hard Drives
1x 500GB SSD
1x 3TB HHDD
4x 1TB in 1+0 RAID
PSU
750W
Case
Antec
Cooling
4 Fans + Liquid Cooling System
Keyboard
Razer Black Widow Ultimate
Mouse
Logitech G700
Internet Speed
23 MB/s
Antivirus
Avast! Antivirus
Browser
Google Chrome
It would be "x86" without quotes.

It would be amd64 if you were installing installing a 64-bit Windows 7
 

My Computer My Computer

At a glance

Windows 7 Ultimate 32-Bit & Windows 7 Ultimat...Intel Core i7 CPU 950 @ 3.07GHzOCZ 6GB (3 x 2GB) 240-Pin DDR3 SDRAM DDR3 160...ATI Radeon HD 5700 Series
Computer Manufacturer/Model Number
Custom Built
OS
Windows 7 Ultimate 32-Bit & Windows 7 Ultimate 64-Bit
CPU
Intel Core i7 CPU 950 @ 3.07GHz
Motherboard
ASUS P6T DELUXE V2
Memory
OCZ 6GB (3 x 2GB) 240-Pin DDR3 SDRAM DDR3 1600 OCZ3X1600R2
Graphics Card(s)
ATI Radeon HD 5700 Series
Sound Card
OnBoard
Hard Drives
WD6400AACS-00M3B0 (640GB SATA )
PSU
CORSAIR 850w
Case
NZXT LEXA
Cooling
Intel Stock Heatsink Fan
Keyboard
Microsoft Wireless Laser Keyboard 7000
Mouse
Microsoft Wireless Laser Mouse 7000
Ok, so now that is covered.. How do we install registry files during setup?
 

My Computer My Computer

At a glance

Windows 8.1Intel i7 4790K 4.0GHz32 GBEVGA
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 8.1
CPU
Intel i7 4790K 4.0GHz
Motherboard
Asus Maximus VI Formula
Memory
32 GB
Graphics Card(s)
EVGA
Sound Card
On-Board Audio
Monitor(s) Displays
HP Pavilion 23xi
Screen Resolution
1920 x 1200
Hard Drives
1x 500GB SSD
1x 3TB HHDD
4x 1TB in 1+0 RAID
PSU
750W
Case
Antec
Cooling
4 Fans + Liquid Cooling System
Keyboard
Razer Black Widow Ultimate
Mouse
Logitech G700
Internet Speed
23 MB/s
Antivirus
Avast! Antivirus
Browser
Google Chrome
Code:
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <RunSynchronous>
       <RunSynchronousCommand wcm:action="add">
          <Order>[B]1[/B]</Order>
          <Path>[B]reg import c:\RegFile.reg[/B]</Path>
          <Description>[B]Import Reg File[/B]</Description>
          <WillReboot>[B]Never[/B]</WillReboot>
       </RunSynchronousCommand>
    </RunSynchronous>
</component>
Or

Code:
<component name="Microsoft-Windows-Deployment"  processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"  language="neutral" versionScope="nonSxS"  xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <RunAsynchronous>
       <RunAsynchronousCommand wcm:action="add">
          <Order>[B]1[/B]</Order>
          <Path>[B]reg import c:\RegFile.reg[/B]</Path>
          <Description>[B]Import Reg File[/B]</Description>
       </RunAsynchronousCommand>
    </RunAsynchronous>
</component>
Need to change the bold text, the order controls the order if you are running more than one command. Will Reboot can be Always, Never or If Required, I think.

These will work from the "windowsPE", "specialize" or the "auditUser" passes I believe, depending on the reg files to where you will run them from but I would recommend the "oobeSystem". HKCU tweaks should probably not be ran any earlier as no account is set up other than the built in Admin which I believe is deleted or restored to it's default state after the audit passes are completed, unless you create a account during an ealier pass which then I don't know if it'll work or not.

For the "oobeSystem" pass you need to use
Code:
<component name="Microsoft-Windows-Shell-Setup"  processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"  language="neutral" versionScope="nonSxS"  xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <FirstLogonCommands>
       <SynchronousCommand wcm:action="add">
          <Order>[B]1[/B]</Order>
          <CommandLine>[B]reg import c:\RegFile.reg[/B]</CommandLine>
          <Description>[B]Import Reg File[/B]</Description>
       </SynchronousCommand>
   </FirstLogonCommands>
</component>
RunSynchronousCommand's must be enclosed between <RunSynchronous> and </RunSynchronous> but you can run as many "RunSynchronousCommand" as you like or run a single batch file, whichever is easiest. Same goes with RunAsynchronousCommand's. For oobe SynchronousCommand's they must between <FirstLogonCommands> and </FirstLogonCommands> but again run as many as you like. Another words there should only be one open and close <RunSynchronous>, <RunAsynchronous> and <FirstLogonCommands> per pass but there can be as many as you like of "RunSynchronousCommand", "RunAsynchronousCommand" and "SynchronousCommand" between them.

There's some restrictions on the passes things can run during and all my info may not be accurate as it has been a while since I created my unattended file so I would recommend downloading the Windows® Automated Installation Kit (AIK) for Windows® 7 which includes Windows System Image Manager and documentation that has all the settings, restrictions and help you should need.

Or at least download just the documentation - Download Windows AIK for Windows 7 documentation (May 2010 update) from Official Microsoft Download Center
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64Intel Pentium Dual Core E5200 2.5GHz (3.77GHz...Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4)Palit GeForce GTS 250 (1024MB)
Computer Manufacturer/Model Number
Self built
OS
Windows 7 Ultimate x64
CPU
Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC)
Motherboard
Asus P5Q-E
Memory
Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4)
Graphics Card(s)
Palit GeForce GTS 250 (1024MB)
Sound Card
On Board (ADI AD2000B 8ch HD)
Monitor(s) Displays
Samsung 32in LCD TV
Screen Resolution
1360x768
Hard Drives
2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures)
PSU
550W Antec Neo HE 550
Case
Antec P180
Cooling
Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans
Keyboard
Logitech MX5000 Laser (Combo)
Mouse
Logitech MX5000 Laser (Combo)
Internet Speed
ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up)
Other Info
Gigabyte GN-WP01GS 54g Wireless Lan Card
Awesome! I'll go ahead and test this. I'll let you know it something comes up.

Thanks!
~curt
 

My Computer My Computer

At a glance

Windows 8.1Intel i7 4790K 4.0GHz32 GBEVGA
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 8.1
CPU
Intel i7 4790K 4.0GHz
Motherboard
Asus Maximus VI Formula
Memory
32 GB
Graphics Card(s)
EVGA
Sound Card
On-Board Audio
Monitor(s) Displays
HP Pavilion 23xi
Screen Resolution
1920 x 1200
Hard Drives
1x 500GB SSD
1x 3TB HHDD
4x 1TB in 1+0 RAID
PSU
750W
Case
Antec
Cooling
4 Fans + Liquid Cooling System
Keyboard
Razer Black Widow Ultimate
Mouse
Logitech G700
Internet Speed
23 MB/s
Antivirus
Avast! Antivirus
Browser
Google Chrome
okay, quick question... can I use the SynchronousCommand to run a batch file as well?
 

My Computer My Computer

At a glance

Windows 8.1Intel i7 4790K 4.0GHz32 GBEVGA
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 8.1
CPU
Intel i7 4790K 4.0GHz
Motherboard
Asus Maximus VI Formula
Memory
32 GB
Graphics Card(s)
EVGA
Sound Card
On-Board Audio
Monitor(s) Displays
HP Pavilion 23xi
Screen Resolution
1920 x 1200
Hard Drives
1x 500GB SSD
1x 3TB HHDD
4x 1TB in 1+0 RAID
PSU
750W
Case
Antec
Cooling
4 Fans + Liquid Cooling System
Keyboard
Razer Black Widow Ultimate
Mouse
Logitech G700
Internet Speed
23 MB/s
Antivirus
Avast! Antivirus
Browser
Google Chrome
Yes, during the "oobeSystem" pass. You can run just about anything using any of them, it's just more or less whether Windows is ready to accept the command. RunSynchronousCommand's and SynchronousCommand's work the same just during different passes only I can't remember if SynchronousCommand's accept the WillReboot field.

A little more info.
The above two commands will halt Windows setup and run each command in order and may cause setup to halt if any command returns certain errorlevels but RunAsynchronousCommand's will continue Windows setup while running the commands in the background. Something like that anyway.

And I forgot to remind you to change processorArchitecture="amd64" like I'm guessing you did earlier and if you already have the component name in your xml then you don't need to add the first or last lines just put the rest between them.

I've uploaded mine for reference, I don't know if they'll help or confuse you though.
You'll read something about HKCU tweaks during the auditUser pass but they are not actually applied there they are being loaded into the RunOnce key in the default user profile so they are applied to all new user accounts (not that I've needed to create any additional accounts yet :rolleyes:).
 

Attachments

My Computer My Computer

At a glance

Windows 7 Ultimate x64Intel Pentium Dual Core E5200 2.5GHz (3.77GHz...Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4)Palit GeForce GTS 250 (1024MB)
Computer Manufacturer/Model Number
Self built
OS
Windows 7 Ultimate x64
CPU
Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC)
Motherboard
Asus P5Q-E
Memory
Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4)
Graphics Card(s)
Palit GeForce GTS 250 (1024MB)
Sound Card
On Board (ADI AD2000B 8ch HD)
Monitor(s) Displays
Samsung 32in LCD TV
Screen Resolution
1360x768
Hard Drives
2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures)
PSU
550W Antec Neo HE 550
Case
Antec P180
Cooling
Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans
Keyboard
Logitech MX5000 Laser (Combo)
Mouse
Logitech MX5000 Laser (Combo)
Internet Speed
ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up)
Other Info
Gigabyte GN-WP01GS 54g Wireless Lan Card
You've got some great code in there! I'm gonna apply some of to mine and let ya know how it works.

THANKS!:D
 

My Computer My Computer

At a glance

Windows 8.1Intel i7 4790K 4.0GHz32 GBEVGA
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 8.1
CPU
Intel i7 4790K 4.0GHz
Motherboard
Asus Maximus VI Formula
Memory
32 GB
Graphics Card(s)
EVGA
Sound Card
On-Board Audio
Monitor(s) Displays
HP Pavilion 23xi
Screen Resolution
1920 x 1200
Hard Drives
1x 500GB SSD
1x 3TB HHDD
4x 1TB in 1+0 RAID
PSU
750W
Case
Antec
Cooling
4 Fans + Liquid Cooling System
Keyboard
Razer Black Widow Ultimate
Mouse
Logitech G700
Internet Speed
23 MB/s
Antivirus
Avast! Antivirus
Browser
Google Chrome
Back
Top