Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Apply regtweaks (also HKCU) and install apps for ALL users


  • Please log in to reply
70 replies to this topic

#26
neuropass

neuropass

    Member

  • Member
  • PipPip
  • 127 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Loading Admin will only apply HKCU to him only.


That was Exactly my point . Why would you use an account with lower privileges when you can use the 'Hidden Admin' with the highest Privileges?


How to remove advertisement from MSFN

#27
maxXPsoft

maxXPsoft

    MSFN Master

  • Developer
  • 2,888 posts
  • OS:Windows 7 x64
  • Country: Country Flag

That was Exactly my point . Why would you use an account with lower privileges when you can use the 'Hidden Admin' with the highest Privileges?

Not everybody going to run as built in Administrator and the majority should not.

try to merge this reg file. Administrator account can't even merge this without setting permissions. Do you feel less powerful now? :whistle:
[HKEY_CLASSES_ROOT\CLSID\{323CA680-C24D-4099-B94D-446DD2D7249E}\ShellFolder]
"Attributes"=dword:a9400100
; Default is a0900100

TrustedInstaller has full permissions on that but Administrators group which Administrator belongs to does not
with UAC off I can do anything the Administrator can do.
Download ++> Windows 7 + 8 Unattended DVD + App Installer + Services Disabler + Load All Button + XML Creator
Jump2Reg - Registry: - Oct 4, 2013 - Version 3.0.4 - 98, ME, NT, 2K, XP, VISTA, Seven, Windows 8+ and 32 or 64 bit

XP Unattended CD/DVD creator - Version 4.1.7
Sample xml + Setupcomplete + Add Right click .wim Windows 7 or Windows 8/8.1

#28
SmokingRope

SmokingRope

    Newbie

  • Member
  • 20 posts
I am installing regtweaks during setup on my unattended usb key. Most of my information for doing this came from the FireGier guide for vista.

To summarize,

You will need two copies of your unattended file, these two files only need to differ by one setting. AutoUnattend.xml will have this line, second file (UnattendedOOBE.xml for remainder of this discussion) does not have this setting. I usually setup autounattend.xml and as a last step before copying to usb key create the UnattendedOOBE.xml from the autounattend.xml

    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-Deployment">
            <Reseal>
                <Mode>Audit</Mode>
            </Reseal>
        </component>
    </settings>

This will cause setup to boot into sysprep mode.

You need to put a command to run during auditUser that will , generalize, capture the image, reboot the system back into OOBE and have it use UnattendedOOBE.xml config instead of autounattend.xml. This needs to be the very last command executed (as the system reboots afterwards).

    <settings pass="auditUser">
        <component name="Microsoft-Windows-Deployment">
            <RunSynchronous>
                <RunSynchronousCommand wcm:action="add">
                    <Order>500</Order>
                    <Description>Reboot into OOBE With Unattend lacking reseal</Description>
                    <Path>C:\Windows\system32\sysprep\sysprep.exe /quiet /oobe /reboot /generalize /unattend:%DVDRoot%\UnattendedOOBE.xml</Path>
                </RunSynchronousCommand>
            </RunSynchronous>
        </component>
    </settings>

During sysprep mode, system will be running as administrative user, to make those settings apply to the default user profile you need to put a setting into specialize pass

    <settings pass="specialize">
        <component name="Microsoft-Windows-Shell-Setup">
            <CopyProfile>true</CopyProfile>
        </component>
    </settings>

To get the %DVDRoot% I just search the drive letters looking for the UnattendedOOBE.xml file in the root directory: (I run this command both in auditUser and specialize passes but i'm not sure whether that's really necessary)

                <RunSynchronousCommand wcm:action="add">
                    <Order>497</Order>
                    <Path>cmd /c &quot;FOR %i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) DO IF EXIST %i:\UnattendedOOBE.xml SETX DVDRoot %i: -m&quot;</Path>
                    <Description>Set Path For DVD</Description>
                </RunSynchronousCommand>


Other things to note:

  • After making changes to the wim (e.g after mount / unmount commit) files, you need to open it up in WSIM and let it rebuild the indexes or whatever, it feels a lot like black-magic but this has fixed several of my problems with rebooting the system using UnattendedOOBE.xml
  • Registry tweaks are applied through .reg files during auditUser pass running command: REGEDIT /s C:\MyRegistryTweaks.reg
  • Installing apps during auditUser means those apps are available to any account in the system...

Hopefully i captured all the relevant steps here, you can refer to the firegeier guide if you run into any issues though.

#29
maxXPsoft

maxXPsoft

    MSFN Master

  • Developer
  • 2,888 posts
  • OS:Windows 7 x64
  • Country: Country Flag
OP didn't want to do Audit Mode or I would have mentioned that CopyProfile

Important:
The built-in administrator account profile is deleted and recreated when you perform a clean Windows installation, or run the Sysprep tool. The CopyProfile setting is processed before the built-in administrator account is deleted, so any customizations that you make should appear in new user account profiles, including the new built-in administrator account profile.


Download ++> Windows 7 + 8 Unattended DVD + App Installer + Services Disabler + Load All Button + XML Creator
Jump2Reg - Registry: - Oct 4, 2013 - Version 3.0.4 - 98, ME, NT, 2K, XP, VISTA, Seven, Windows 8+ and 32 or 64 bit

XP Unattended CD/DVD creator - Version 4.1.7
Sample xml + Setupcomplete + Add Right click .wim Windows 7 or Windows 8/8.1

#30
SmokingRope

SmokingRope

    Newbie

  • Member
  • 20 posts

Now 2 weeks later I would like to replace Firefox in my uA_Win7 setupdvd with the newest Firefox 4 final. I would have to capture a new image right?

I want to be able to just replace the FF4 beta installer with the FF4 final installer. Done, finished, nothing extras. Not even modify the batch file or xml that executes the installers or whatever since all I have to do is make sure the setup filename is still the same.
This is the way I could do it for winXP and I'm looking for a similar method for Win7. Without having to create a personalized image to capture everytime I want to update my Win7 setup DVD.


I got the impression he believed audit mode was a manual process as is suggested by most of the tutorials on tech republic. Using copy profile as described, audit mode is applied inline during installation and is completely unattended. You can throw your apps on your dvd / usb stick and install your apps directly from there without changing the unattended process at all.

It is the equivalent of the old windows XP procedure.

Edited by SmokingRope, 06 April 2011 - 07:32 PM.


#31
Major

Major

    Advanced Member

  • Member
  • PipPipPip
  • 308 posts
So the command have you told, you must write in the file UnattendedOOBE.xml or Autonunattend.xml? because i have tried the sysprep at the first of my unattended but i had never got that HKCU are been applied to all the user and the future users also, then i have used the other method setupcomplete.cmd which it works perfectly. Neverthless i will try the method sysprep as i want to learn how it works.
  <settings pass="specialize"> 
        <component name="Microsoft-Windows-Shell-Setup"> 
            <CopyProfile>true</CopyProfile> 
        </component> 
    </settings>

Edited by Major, 07 April 2011 - 04:10 AM.


#32
RickSteele

RickSteele

    Rick Steele

  • Member
  • PipPip
  • 259 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Came across this M$ URL and thought some may find it helpful:

http://technet.micro...318(WS.10).aspx

#33
ZileXa

ZileXa

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 767 posts
Hi SmokingRope, I have questions about it. Hope you can clarify the process for me.
I have 1 unattend.xml and I install my software via setupcomplete.cmd (because Office 2010 x64 and Paint.net cannot be installed earlier, they will fail).

If I understand your process correct, it should go like this:

1. Windows setup starts with AutoUnattend.xml. This file contains the settingspass OobeSystem + settingspass auditUser + settings pass Specialise lines from your post. Setup will boot into sysprep.

2. in sysprep, what happens now? Is input from the user required?
I think this is what I should do: add a command to auditUser that will run my regtweaks, install apps, cleanup startmenu. This command should run first, your auditUser command to generalize should run last.
Is this correct?

3. after your auditUser command has run, system will reboot again and continue normally using the 2nd xml file. this file does NOT contain your Oobesystem/audituser/specialise lines. Is this Correct?

4. I do not understand how your note about "changes to WIM" is related to the process. I am not changing WIM or anything. I just want to apply my regtweaks for all users.

#34
SmokingRope

SmokingRope

    Newbie

  • Member
  • 20 posts
The order the passes run is something like:

1) windows PE
2) oobeSystem (reboot here)
3) specialize
4) audit user (reboot here - from last command)
5) oobeSystem again with UnattendedOOBE.xml

During auditUser the environment is setup, and programs can run just like they would after setup is finished. Input *could* be provided during auditUser pass but if you set up command-lines right then no input is necessary.

You just have to remove a few lines from UnattendedOOBE.xml (the reseal part) - process reboots from auditUser directly into OOBESystem step so it doesn't matter what you have in the other passes.

            <Reseal>
                <Mode>Audit</Mode>
            </Reseal>

As for the note about the WIM, i can't say that it will affect you but it has caused a lot of headaches for me while doing this. I always slipstream hotfixes and put the applications i am installing in the WIM and if you don't rebuild the index (or whatever it's called, haven't done it recently) then during setup, sysPrep fails to load the UnattendedOOBE.xml and you end up having to click through the boxes in step #5 above and registry settings are not applied because *generalize* didn't take place. It takes an hour to get to this point inside a virtual machine so it's a pain to debug / test (I probably have wasted days on the issue). The actual solution was found serendipitously and the only thing i know is that it seems to work.

EDIT:
Rebuilding the WIM: it might be helpful to grab the error codes from the UnattendedGC.log / Panther.log files and put them in this thread somewhere for search engines to pickup. Will see about doing this if I have time.

Edited by SmokingRope, 10 April 2011 - 10:45 AM.


#35
maxXPsoft

maxXPsoft

    MSFN Master

  • Developer
  • 2,888 posts
  • OS:Windows 7 x64
  • Country: Country Flag

The order the passes run is something like:

1) windows PE
2) oobeSystem (reboot here)
3) specialize
4) audit user (reboot here - from last command)
5) oobeSystem again with UnattendedOOBE.xml

where did you get that? I suggest you look at unattend.chm
depending on what you have added
Attached File  passes.PNG   19.17KB   8 downloads
Download ++> Windows 7 + 8 Unattended DVD + App Installer + Services Disabler + Load All Button + XML Creator
Jump2Reg - Registry: - Oct 4, 2013 - Version 3.0.4 - 98, ME, NT, 2K, XP, VISTA, Seven, Windows 8+ and 32 or 64 bit

XP Unattended CD/DVD creator - Version 4.1.7
Sample xml + Setupcomplete + Add Right click .wim Windows 7 or Windows 8/8.1

#36
marcusj0015

marcusj0015

    Member

  • Member
  • PipPip
  • 154 posts
why in the hell are you making a whole new disc every other WEEK?

what you need to do is put a folder called like Apps, inside your image, with the program installers, and use SetupComplete.CMD, to install the exe's

#37
maxXPsoft

maxXPsoft

    MSFN Master

  • Developer
  • 2,888 posts
  • OS:Windows 7 x64
  • Country: Country Flag

sources\$OEM$\$$\SETUP\Scripts\Setupcomplete.cmd Setupcomplete.cmd runs right before Load Desktop and can be used to complete Final Steps. Commands in the Setupcomplete.cmd file are executed with local system privilege.
HKLM Reg tweaks can be ran here but not HKCU which are user specific.

Try running Windows Calendar(WinCal-Win7-amd64-en-us.exe) or WinPinball-en-us.exe in setupcomplete and they fail. Why? Because a user is not yet created. That run's right before Login screen. Why do I set login? To observe when things are actually happening I get a better picture.
I will try those in Firstlogoncommands next but that starts after you login and GUI is loading = User Created
Download ++> Windows 7 + 8 Unattended DVD + App Installer + Services Disabler + Load All Button + XML Creator
Jump2Reg - Registry: - Oct 4, 2013 - Version 3.0.4 - 98, ME, NT, 2K, XP, VISTA, Seven, Windows 8+ and 32 or 64 bit

XP Unattended CD/DVD creator - Version 4.1.7
Sample xml + Setupcomplete + Add Right click .wim Windows 7 or Windows 8/8.1

#38
ZileXa

ZileXa

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 767 posts
Actually, I just ran another test and I am asked to create a user before setupcomplete.cmd is executed. It is executed after creating a user account but before that user logs in.

Since I now finally have a stable stripped down Win7 x64 Ultimate image without WinSxS I am going to test SmokingRope's method :) Will report later.

Edited by ZileXa, 18 April 2011 - 03:23 PM.


#39
ZileXa

ZileXa

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 767 posts
Completely edited this post because I understand it much better now!

1. AutoUnattend.xml will be used first by Windows Setup.
2. By using this command, Setup reboots into Sysprep mode and AutoUnattend.xml is still being used by setup after the reboot
(this was where you lost me, I thought UnattendOOBE.xml kicked in after this reboot, thats not the case):
<settings pass="oobeSystem">
        <component name="Microsoft-Windows-Deployment">
            <Reseal>
                <Mode>Audit</Mode>
            </Reseal>
        </component>
    </settings>

3. Also, this code is needed to make sure everything that happens after the above mentioned reboot-into-sysprep will be copied to the defaultprofile:
<settings pass="specialize">
	<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" />
	<component name="Microsoft-Windows-Security-Licensing-SLC-UX" 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">
  	<SkipAutoActivation>true</SkipAutoActivation>
	</component>
	<component name="Microsoft-Windows-Shell-Setup">
 		<CopyProfile>true</CopyProfile
	</component>  
</settings>

4. So Setup has rebooted and is in sysprep state. Setup will now look at settings pass auditUser and perform the commands there (Setup is still reading AutoUnattend.xml):
<settings pass="auditUser">
  	<component name="Microsoft-Windows-Deployment">
      	<RunSynchronous>
        	<RunSynchronousCommand wcm:action="add">
          	<Order>490</Order>
          	<Path>cmd /c "FOR %i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) DO IF EXIST %i:\UnattendedOOBE.xml SETX DVDRoot %i:"</Path>
          	<Description>Set Path For DVD</Description>
        	</RunSynchronousCommand>
        	<RunSynchronousCommand wcm:action="add">
            	<Order>495</Order>
            	<Description>Install apps and HKCU + HKLM regtweaks</Description>
            	<Path>cmd /c %DVDRoot%\InstallAppsTweaks.cmd</Path>
        	</RunSynchronousCommand>
        	<RunSynchronousCommand wcm:action="add">
            	<Order>500</Order>
            	<Description>Reboot into OOBE With Unattend lacking reseal</Description>
            	<Path>C:\Windows\system32\sysprep\sysprep.exe /quiet /oobe /reboot /generalize /unattend:%DVDRoot%\UnattendedOOBE.xml</Path>
        	</RunSynchronousCommand>
      	</RunSynchronous>
  	</component>
  </settings>

5. Note the final command in the code above, Setup will reboot again. After reboot Setup will no longer use AutoUnattend.xml. Instead UnattendedOOBE.xml is used.
UnattendedOOBE.xml is an exact copy of AutoUnattend.xml but it misses the code from step (1) therefore, the code in step (4) is completely ignored.

--> Is this correct?
--> Is it safe to leave the code from step 3 in UnattendedOOBE.xml? Since it's a copy of AutoUnattend minus the code in step (1).
--> I still wonder how and when everything is copied to the default user since you reboot again at the end of step (4), not giving the system any chance to copy everything to the default profile!

(edit: btw I am NOT modifying WIM before I create my ISO image. All the setupfiles/installers of my apps are in %dvdroot%\Apps and I use a .cmd file to install them silently, clean up start menu, copy predefined startmenu, add pins to taskbar/startmenu and run a regtweaks.reg file). So I rebuilding indexes doesnt apply here.)

Please note before replying this post has completely been modified (I tend to read a message in my mail, come to the forum and immediately start my response without noticing changes to the post I am replying to).

Edited by ZileXa, 18 April 2011 - 04:49 PM.


#40
SmokingRope

SmokingRope

    Newbie

  • Member
  • 20 posts
Zilexa - it sounds like you know as much as I do about this now. As far as i am aware it is safe to keep the auditUser / specialize / windowsPE passes in UnattendedOOBE.xml - i think it's equally safe to remove them.

Edited by SmokingRope, 19 April 2011 - 05:16 PM.


#41
ZileXa

ZileXa

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 767 posts
deleted by me sorry.

Edited by ZileXa, 20 April 2011 - 03:06 PM.


#42
ZileXa

ZileXa

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 767 posts
Unfortunately, it was not a success. First there were many errors in my XML I spend a few hours finding them, creating an ISO and testing over and over again (I first checked the xml file in XMLspy to see if it was wellformed).

Once the XML worked... Setup continued but after rebooting into sysprep, input was required! The InstallApps.cmd file was never called. See the screenshot below.
Posted Image



Also when I selected "Audit Mode", checked "Generalize" and press OK I got an error message, see the second screenshot. I don't have a clue what went wrong.
Posted Image


I assume the part of the xml settings pass "Audit User" is not being triggered after the system reboots into sysprep. So nothing happens unattendedly.
Here is my Autounattend.xml:
Attached File  autounattend.xml   5.23KB   8 downloads
<?xml version="1.0" encoding="utf-8"?>
<!--This answer file generated by RT Seven Lite and completely modified by ZileXa-->
<unattend xmlns="urn:schemas-microsoft-com:unattend">
  <settings pass="windowsPE">
	<component name="Microsoft-Windows-International-Core-WinPE" 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">
  	<SetupUILanguage>
    	<UILanguage>en-US</UILanguage>
  	</SetupUILanguage>
  	<InputLocale>0409:00020409</InputLocale>
  	<UserLocale>nl-NL</UserLocale>
  	<UILanguage>en-US</UILanguage>
  	<SystemLocale>en-US</SystemLocale>
	</component>
	<component name="Microsoft-Windows-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">
  	<ImageInstall>
    	<OSImage>
      	<InstallFrom>
        	<MetaData wcm:action="add">
          	<Key>/IMAGE/NAME</Key>
          	<value>Windows 7 ULTIMATE</value>
        	</MetaData>
      	</InstallFrom>
      	<WillShowUI>OnError</WillShowUI>
    	</OSImage>
  	</ImageInstall>
  	<UserData>
    	<ProductKey>
      	<Key>REMOVEDBYME</Key>
      	<WillShowUI>OnError</WillShowUI>
    	</ProductKey>
    	<AcceptEula>true</AcceptEula>
  	</UserData>
	</component>
  </settings>
  <settings pass="oobeSystem">
	<component name="Microsoft-Windows-International-Core" 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">
    	<SystemLocale>en-US</SystemLocale>
    	<UILanguage>en-US</UILanguage>
    	<UserLocale>0409:00020409</UserLocale>
	</component>  
	<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">
  	<UserAccounts>
    	<LocalAccounts />
  	</UserAccounts>
  	<OOBE>
    	<NetworkLocation>Home</NetworkLocation>
    	<HideEULAPage>true</HideEULAPage>
    	<ProtectYourPC>3</ProtectYourPC>
    	<HideWirelessSetupInOOBE>false</HideWirelessSetupInOOBE>
    	<SkipMachineOOBE>false</SkipMachineOOBE>
    	<SkipUserOOBE>false</SkipUserOOBE>
  	</OOBE>
  	<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
  	<TimeZone>W. Europe Standard Time</TimeZone>
  	<VisualEffects>
      	<FontSmoothing>ClearType</FontSmoothing>
  	</VisualEffects>
	</component>
	<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">
  	<Reseal>
    	<Mode>Audit</Mode>
  	</Reseal>
	</component>
  </settings>
  <settings pass="specialize">
	<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">
  	<CopyProfile>true</CopyProfile>
	</component> 
	<component name="Microsoft-Windows-Security-Licensing-SLC-UX" 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">
  	<SkipAutoActivation>true</SkipAutoActivation>
	</component>
  </settings>
  <settings pass="auditUser">
	<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>490</Order>
      	<Description>Set Path For DVD</Description>
      	<Path>cmd /c "FOR %i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) DO IF EXIST %i:\UnattendedOOBE.xml SETX DVDRoot %i:"</Path>
    	</RunSynchronousCommand>
    	<RunSynchronousCommand wcm:action="add">
      	<Order>495</Order>
      	<Description>Install apps and regtweaks</Description>
      	<Path>cmd /c %DVDRoot%\InstallApps.cmd</Path>
    	</RunSynchronousCommand>
    	<RunSynchronousCommand wcm:action="add">
      	<Order>500</Order>
      	<Description>Reboot into OOBE With Unattend lacking reseal</Description>
      	<Path>C:\Windows\system32\sysprep\sysprep.exe /quiet /oobe /reboot /generalize /unattend:%DVDRoot%\UnattendedOOBE.xml</Path>
    	</RunSynchronousCommand>
  	</RunSynchronous>
	</component>
  </settings>
</unattend>

Attached File  autounattend.xml   5.23KB   8 downloads

Edited by ZileXa, 20 April 2011 - 02:58 PM.


#43
jd976

jd976

    Newbie

  • Member
  • 15 posts
Any hkcu tweaks that don't apply by injecting into hive, such as FullRowSelect tweaks. I make a self deleting 7zip sfx and place it in default user startup folder.

Directory needs to be created.

cmd for creating directory

md "<your mount dir>\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"

Then I use xcopy to move the files.

In this way the tweaks get applied at first logon for all newly created users, then deletes itself for the current user.

Example of my Config.txt for sfx.

;!@Install@!UTF-8!
Title="7-ZIP SFX archive"
Progress="no"
SelfDelete="1"
GUIFlags="8"
OverwriteMode="0"
ExtractPathText="Select extraction path"
ExtractPathTitle="7-ZIP SFX archive"
ExtractCancelText="Abort"
RunProgram="%SystemRoot%\\regedit /s %%T\\HKCU.reg"
;!@InstallEnd@!

This is my fullrowselect tweaks, keeps "my computer" in tile mode instead of entended tiles. As well as sets 10000 folder remember limit, instead of default 5000.

Windows Registry Editor Version 5.00 
 

[-HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags] 

[-HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU]

[-HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags]

[-HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\BagMRU]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] 
"NoSaveSettings"=- 
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] 
"NoSaveSettings"=- 
 
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] 
"FullRowSelect"=dword:00000000 
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell] 
"KnownFolderDerivedFolderType"="{57807898-8C4F-4462-BB63-71042380B109}" 
"SniffedFolderType"="Generic" 
"FolderType"="NotSpecified" 
 

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU]
"NodeSlots"=hex:02,02
"MRUListEx"=hex:00,00,00,00,ff,ff,ff,ff
"0"=hex:14,00,1f,50,e0,4f,d0,20,ea,3a,69,10,a2,d8,08,00,2b,30,30,9d,00,00
"NodeSlot"=dword:00000002
"BagMRU Size"=dword:00002710

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU\0]
"NodeSlot"=dword:00000001
"MRUListEx"=hex:ff,ff,ff,ff

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags]
"BagMRU Size"=dword:00002710

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\1\Shell\{5C4F28B5-F869-4E84-8E60-F11DB97C5CC7}]
"Rev"=dword:00000000
"FFlags"=dword:41000011
"Vid"="{65F125E5-7BE1-4810-BA9D-D271C8432CE3}"
"Mode"=dword:00000006
"LogicalViewMode"=dword:00000002
"IconSize"=dword:00000030
"GroupView"=dword:ffffffff
"GroupByKey:FMTID"="{B725F130-47EF-101A-A5F1-02608C9EEBAC}"
"GroupByKey:PID"=dword:00000004
"GroupByDirection"=dword:00000001

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{5C4F28B5-F869-4E84-8E60-F11DB97C5CC7}]
"FolderType"="Generic"
"Rev"=dword:00000000
"FFlags"=dword:43000011
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{5fa96407-7e77-483c-ac93-691d05850de8}]
"FolderType"="Videos"
"Rev"=dword:00000000
"FFlags"=dword:43000011
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{7d49d726-3c21-4f05-99aa-fdc2c9474656}]
"FolderType"="Documents"
"Rev"=dword:00000000
"FFlags"=dword:43000011
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{94d6ddcc-4a68-4175-a374-bd584a510b78}]
"FolderType"="Music"
"Rev"=dword:00000000
"FFlags"=dword:43000011
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{b3690e58-e961-423b-b687-386ebfd83239}]
"FolderType"="Pictures"
"Rev"=dword:00000000
"FFlags"=dword:43000011
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{DE2B70EC-9BF7-4A93-BD3D-243F7881D492}]
"FolderType"="Contacts"
"Rev"=dword:00000000
"FFlags"=dword:43000011
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004

I also place my taskbar editing scripts here so it applies to all newly created users.

#44
ZileXa

ZileXa

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 767 posts
Thanks I use a similar method now with RunOnce (starts a cmd file for every user) but the method I am testing (see post #39 and my post above yours) is much more *neat* and clean since tweaks and stuff will be applied to the default user, wich needs to be done only once.So I would really like this to work instead of going for a trick like I am using now....

I checked my xml above again for errors, couldnt find one :S

Edited by ZileXa, 20 April 2011 - 03:23 PM.


#45
ZileXa

ZileXa

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 767 posts
Investigated more, this command was not working:
[code<Path>cmd /c "FOR %i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) DO IF EXIST %i:\UnattendedOOBE.xml SETX DVDRoot %i:"</Path>[/code]
So I am using my own command tested a while ago in a different topic.
That works. Now apps are installed!

I am now stuck at an error when executing SYSPREP.EXE (see my post above) the final command in Pass Audit User. The system doesn't reboot, I see a small window with a progess bar, sysprep doing something. Then it disappears and nothing happens:
<Path>C:\Windows\system32\sysprep\sysprep.exe /quiet /oobe /reboot /generalize /unattend:C:\AutoUnattendedOOBE.xml</Path>


The logfile shows me the command is correct but it also shows a failure concerning a file called wevtapi.dll (the file is present in system32, I checked, 418KB. Version number 1.7600.16385).

setuperr.log:
2011-04-22 15:02:53, Error  	[0x0f0082] SYSPRP LaunchDll:Failure occurred while executing 'C:\Windows\System32\wevtapi.dll,EvtIntSysprepCleanup', returned error code 15007[gle=0x00003a9f]
2011-04-22 15:02:53, Error  	[0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 15007[gle=0x00003a9f]
2011-04-22 15:02:53, Error  	[0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep cleanup providers; hr = 0x80073a9f[gle=0x00003a9f]

and setupact.log:
2011-04-22 15:02:53, Info              	SYSPRP ========================================================
2011-04-22 15:02:53, Info              	SYSPRP ===      	Beginning of a new sysprep run      	===
2011-04-22 15:02:53, Info              	SYSPRP ========================================================
2011-04-22 15:02:53, Info   	[0x0f004d] SYSPRP The time is now 2011-04-22 15:02:53
2011-04-22 15:02:53, Info   	[0x0f004e] SYSPRP Initialized SysPrep log at C:\Windows\System32\sysprep\Panther
2011-04-22 15:02:53, Info   	[0x0f0054] SYSPRP ValidateUser:User has required privileges to sysprep machine
2011-04-22 15:02:53, Info   	[0x0f007e] SYSPRP FCreateTagFile:Tag file C:\Windows\System32\sysprep\Sysprep_succeeded.tag does not already exist, no need to delete anything
2011-04-22 15:02:53, Warning       		SYSPRP WinMain: File operations pending
2011-04-22 15:02:53, Info   	[0x0f005f] SYSPRP ParseCommands:Found supported command line option 'QUIET'
2011-04-22 15:02:53, Info   	[0x0f005f] SYSPRP ParseCommands:Found supported command line option 'GENERALIZE'
2011-04-22 15:02:53, Info   	[0x0f005f] SYSPRP ParseCommands:Found supported command line option 'OOBE'
2011-04-22 15:02:53, Info   	[0x0f005f] SYSPRP ParseCommands:Found supported command line option 'REBOOT'
2011-04-22 15:02:53, Info   	[0x0f005f] SYSPRP ParseCommands:Found supported command line option 'UNATTEND'
2011-04-22 15:02:53, Info   	[0x0f004a] SYSPRP WaitThread:Entering spawned waiting thread
2011-04-22 15:02:53, Info                 		[sysprep.exe] UnattendFindAnswerFile: Looking at explicitly provided unattend file [C:\AutounattendOOBE.xml]...
2011-04-22 15:02:53, Info                 		[sysprep.exe] UnattendFindAnswerFile: [C:\AutounattendOOBE.xml] meets criteria for an explicitly provided unattend file.
2011-04-22 15:02:53, Info              	SYSPRP SysprepSearchForUnattend: Using unattend file at [C:\AutounattendOOBE.xml].
2011-04-22 15:02:53, Info              	SYSPRP SysprepSearchForUnattend: [generalize] pass in unattend file [C:\AutounattendOOBE.xml] either doesn't exist or passed validation
2011-04-22 15:02:53, Info              	SYSPRP WinMain:Found unattend file at [C:\AutounattendOOBE.xml]; caching...
2011-04-22 15:02:53, Info              	SYSPRP WinMain:Processing unattend file's 'generalize' pass...
2011-04-22 15:02:53, Info              	SYSPRP Sysprep is running a generalize pass with the following unattend file: [%windir%\panther\unattend.xml]
2011-04-22 15:02:53, Info              	SYSPRP RunUnattendGeneralizePass: Sysprep unattend generalize pass exits; hr = 0x0, hrResult = 0x0, bRebootRequired = 0x0
2011-04-22 15:02:53, Info   	[0x0f00ac] SYSPRP WinMain:Processing 'cleanup' external provider request.
2011-04-22 15:02:53, Info   	[0x0f006c] SYSPRP RunExternalDlls:Running DLLs listed in registry for phase 3
2011-04-22 15:02:53, Info   	[0x0f008a] SYSPRP RunRegistryDlls:Retrieved section name for this phase as Cleanup
2011-04-22 15:02:53, Warning	[0x0f008f] SYSPRP RunRegistryDlls:Registry key is either empty or malformed: SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\SysPrepExternal\Cleanup
2011-04-22 15:02:53, Info   	[0x0f00ad] SYSPRP WinMain:Processing 'generalize' extrenal provider request.
2011-04-22 15:02:53, Info   	[0x0f006c] SYSPRP RunExternalDlls:Running DLLs listed in registry for phase 1
2011-04-22 15:02:53, Info   	[0x0f008a] SYSPRP RunRegistryDlls:Retrieved section name for this phase as Generalize
2011-04-22 15:02:53, Warning	[0x0f008f] SYSPRP RunRegistryDlls:Registry key is either empty or malformed: SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\SysPrepExternal\Generalize
2011-04-22 15:02:53, Info   	[0x0f003f] SYSPRP WinMain:Processing 'cleanup' internal provider request.
2011-04-22 15:02:53, Info   	[0x0f006c] SYSPRP RunExternalDlls:Running DLLs listed in registry for phase 3
2011-04-22 15:02:53, Info   	[0x0f008a] SYSPRP RunRegistryDlls:Retrieved section name for this phase as Cleanup
2011-04-22 15:02:53, Info   	[0x0f008b] SYSPRP RunRegistryDlls:Found entrypoint in registry at SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\SysPrep\Cleanup\{67196725-a666-73a6-a048-412e48a3b856}; will try to launch 'C:\Windows\System32\spopk.dll,Sysprep_Clean_Opk'
2011-04-22 15:02:53, Info   	[0x0f0080] SYSPRP LaunchDll:Found 'C:\Windows\System32\spopk.dll,Sysprep_Clean_Opk'; executing it
2011-04-22 15:02:53, Info   	[0x0f0081] SYSPRP LaunchDll:Successfully executed 'C:\Windows\System32\spopk.dll,Sysprep_Clean_Opk' without error
2011-04-22 15:02:53, Info   	[0x0f008b] SYSPRP RunRegistryDlls:Found entrypoint in registry at SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\SysPrep\Cleanup\{1e7f4452-a4b4-5a32-d01e-70397b096ced}; will try to launch 'sqmapi.dll,SqmSysprepCleanup'
2011-04-22 15:02:53, Info   	[0x0f0080] SYSPRP LaunchDll:Found 'sqmapi.dll,SqmSysprepCleanup'; executing it
2011-04-22 15:02:53, Info   	[0x0f0081] SYSPRP LaunchDll:Successfully executed 'sqmapi.dll,SqmSysprepCleanup' without error
2011-04-22 15:02:53, Info   	[0x0f008b] SYSPRP RunRegistryDlls:Found entrypoint in registry at SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\SysPrep\Cleanup\{2c8a362b-4dc1-38b9-c4d8-ce732ddcc48e}; will try to launch 'C:\Windows\System32\wevtapi.dll,EvtIntSysprepCleanup'
2011-04-22 15:02:53, Info   	[0x0f0080] SYSPRP LaunchDll:Found 'C:\Windows\System32\wevtapi.dll,EvtIntSysprepCleanup'; executing it
2011-04-22 15:02:53, Error  	[0x0f0082] SYSPRP LaunchDll:Failure occurred while executing 'C:\Windows\System32\wevtapi.dll,EvtIntSysprepCleanup', returned error code 15007[gle=0x00003a9f]
2011-04-22 15:02:53, Error  	[0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 15007[gle=0x00003a9f]
2011-04-22 15:02:53, Error  	[0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep cleanup providers; hr = 0x80073a9f[gle=0x00003a9f]
2011-04-22 15:02:53, Info   	[0x0f004c] SYSPRP WaitThread:Exiting spawned waiting thread
2011-04-22 15:02:53, Info   	[0x0f0052] SYSPRP Shutting down SysPrep log
2011-04-22 15:02:53, Info   	[0x0f004d] SYSPRP The time is now 2011-04-22 15:02:53


Ideas anyone?

Edited by ZileXa, 22 April 2011 - 07:16 AM.


#46
ZileXa

ZileXa

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 767 posts
I did some more testing but I am really stuck at this strange error. I tried running sysprep with less commands/switches or just doing it manually... enter oobe or enter audit mode it all gives me the same error.

#47
maxXPsoft

maxXPsoft

    MSFN Master

  • Developer
  • 2,888 posts
  • OS:Windows 7 x64
  • Country: Country Flag
It don't like something. I don't know what you have added like exe reg tweaks and such
Remove part of what you have done and try again. takes some debugging to figure out what is wrong
Download ++> Windows 7 + 8 Unattended DVD + App Installer + Services Disabler + Load All Button + XML Creator
Jump2Reg - Registry: - Oct 4, 2013 - Version 3.0.4 - 98, ME, NT, 2K, XP, VISTA, Seven, Windows 8+ and 32 or 64 bit

XP Unattended CD/DVD creator - Version 4.1.7
Sample xml + Setupcomplete + Add Right click .wim Windows 7 or Windows 8/8.1

#48
ZileXa

ZileXa

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 767 posts
I tested, without running any script batch or regfile. Just reboot and do immediate sysprep. Same error appeared. I think it has something to do with features I removed with RTLite/vlite (I removed WinSxS following this topic).

#49
nitro322

nitro322

    Advanced Member

  • Developer
  • 387 posts
I have this sysprep problem as well. The process described by SmokingRope seems sound, but something about the sysprep step is rather fragile. I initially started looking into this because I had the same issue with preinstalled apps/configuration settings not being applied to the default user. I was using rt7lite originally as well, and couldn't get the sysprep step to take; it'd just fail in the same way as described above. I then tried switching to a manual build process, and that worked! ... until I tried slipstreaming IE9. Then it failed again. I've since rebuilt my image without IE9, and it still fails, no matter what I do.

This really rather sucks. It shouldn't be so difficult to apply default user settings. This is my last major stumbling block, so I'd be really interested to hear any workarounds or alternative solutions. I've been hammering away at this myself on-and-off for about three weeks now, but I've not had any (reliable) success.

Edited by nitro322, 01 May 2011 - 08:29 PM.


#50
ZileXa

ZileXa

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 767 posts

I have this sysprep problem as well. The process described by SmokingRope seems sound, but something about the sysprep step is rather fragile. I initially started looking into this because I had the same issue with preinstalled apps/configuration settings not being applied to the default user. I was using rt7lite originally as well, and couldn't get the sysprep step to take; it'd just fail in the same way as described above. I then tried switching to a manual build process, and that worked! ... until I tried slipstreaming IE9. Then it failed again. I've since rebuilt my image without IE9, and it still fails, no matter what I do.

This really rather sucks. It shouldn't be so difficult to apply default user settings. This is my last major stumbling block, so I'd be really interested to hear any workarounds or alternative solutions. I've been hammering away at this myself on-and-off for about three weeks now, but I've not had any (reliable) success.


In that case, why not simply use your "manual build process" (please enlighten me, I don't have a clue) and install IE9 unattendedly using Setupcomplete.cmd (wich will run right after useraccount creation but before first login)?








0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN