Unattend - Disable UAC, Install Reg files, etc.

Page 1 of 2 12 LastLast

  1. Posts : 48
    Windows 8.1
       #1

    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 Computer


  2. Posts : 22,814
    W 7 64-bit Ultimate
       #2

    Hello mate, you may find this interesting.


      My Computer


  3. Posts : 6,830
    Windows 7 Ultimate 32-Bit & Windows 7 Ultimate 64-Bit
       #3

    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
      My Computer


  4. Posts : 48
    Windows 8.1
    Thread Starter
       #4

    RE:


    So it would be amdx32 right or just x32?
      My Computer


  5. Posts : 6,830
    Windows 7 Ultimate 32-Bit & Windows 7 Ultimate 64-Bit
       #5

    It would be "x86" without quotes.

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


  6. Posts : 48
    Windows 8.1
    Thread Starter
       #6

    Ok, so now that is covered.. How do we install registry files during setup?
      My Computer


  7. Posts : 640
    Windows 7 Ultimate x64
       #7

    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 Computer


  8. Posts : 48
    Windows 8.1
    Thread Starter
       #8

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

    Thanks!
    ~curt
      My Computer


  9. Posts : 48
    Windows 8.1
    Thread Starter
       #9

    okay, quick question... can I use the SynchronousCommand to run a batch file as well?
      My Computer


  10. Posts : 640
    Windows 7 Ultimate x64
       #10

    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 ).
    Unattend - Disable UAC, Install Reg files, etc. Attached Files
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About 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 05:10.
Find Us