Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Unattend - Disable UAC, Install Reg files, etc.


04 Mar 2013   #1

Windows 7 Ultimate
 
 
Unattend - Disable UAC, Install Reg files, etc.

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 System SpecsSystem Spec
.

04 Mar 2013   #2
Microsoft MVP

W 7 64-bit Ultimate
 
 

Hello mate, you may find this interesting.

Elevated Program Shortcut without UAC Prompt - Create

My System SpecsSystem Spec
04 Mar 2013   #3

Windows 7 Ultimate 32-Bit & Windows 7 Ultimate 64-Bit
 
 

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   Note
Change processorArchitecture to x86 if its a 32 bit installation


Tip   Tip
See if this will help
My System SpecsSystem Spec
.


04 Mar 2013   #4

Windows 7 Ultimate
 
 
RE:

So it would be amdx32 right or just x32?
My System SpecsSystem Spec
04 Mar 2013   #5

Windows 7 Ultimate 32-Bit & Windows 7 Ultimate 64-Bit
 
 

It would be "x86" without quotes.

It would be amd64 if you were installing installing a 64-bit Windows 7
My System SpecsSystem Spec
04 Mar 2013   #6

Windows 7 Ultimate
 
 

Ok, so now that is covered.. How do we install registry files during setup?
My System SpecsSystem Spec
11 Mar 2013   #7

Windows 7 Ultimate x64
 
 

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>1</Order>
          <Path>reg import c:\RegFile.reg</Path>
          <Description>Import Reg File</Description>
          <WillReboot>Never</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>1</Order>
          <Path>reg import c:\RegFile.reg</Path>
          <Description>Import Reg File</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>1</Order>
          <CommandLine>reg import c:\RegFile.reg</CommandLine>
          <Description>Import Reg File</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 System SpecsSystem Spec
11 Mar 2013   #8

Windows 7 Ultimate
 
 

Awesome! I'll go ahead and test this. I'll let you know it something comes up.

Thanks!
~curt
My System SpecsSystem Spec
11 Mar 2013   #9

Windows 7 Ultimate
 
 

okay, quick question... can I use the SynchronousCommand to run a batch file as well?
My System SpecsSystem Spec
12 Mar 2013   #10

Windows 7 Ultimate x64
 
 

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 ).


Attached Files
File Type: txt Autounattend.txt (15.6 KB, 23 views)
File Type: txt Unattend-OOBE.txt (3.1 KB, 18 views)
My System SpecsSystem Spec
Reply

 Unattend - Disable UAC, Install Reg files, etc.




Thread Tools



Similar help and support threads for2: Unattend - Disable UAC, Install Reg files, etc.
Thread Forum
x32 Sysprep unattend.xml for x64? Customization
Win 7 unattend.xml and domain join Network & Sharing
How to disable sharing files over lan Network & Sharing
Windows 7 32bit Install USB & Unattend Installation & Setup
Unattend.xml / DriverSigningPolicy Drivers
Disable other users from seeing my files Network & Sharing
Unattend Install File Win 7 Computer Name Installation & Setup

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 12:48 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33