Jump to content

Working Unattend.xml and Applications Installs


Recommended Posts

Can someone provide an example of a working Unattend.XML that has completed installation of 3d party applications(firefox).

I have been using WAIK with Run Synchronous Commands in Audit and OOBE with no luck. I have seen several examples but I feel that I am missing something.

Link to comment
Share on other sites


Can someone provide an example of a working Unattend.XML that has completed installation of 3d party applications(firefox).

I have been using WAIK with Run Synchronous Commands in Audit and OOBE with no luck. I have seen several examples but I feel that I am missing something.

I have same problem here, can't make work Application Install usying AutoUnattend.XML for my AiO(x86+x64) Seven installation.

Here my AutoUnattend.XML file:

<?xml version="1.0" encoding="utf-8"?>
<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">
<InputLocale>0416:00010416</InputLocale>
<SystemLocale>pt-BR</SystemLocale>
<UILanguage>pt-BR</UILanguage>
<UserLocale>pt-BR</UserLocale>
</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>
<WillShowUI>OnError</WillShowUI>
</OSImage>
</ImageInstall>
<UserData>
<ProductKey>
<WillShowUI>OnError</WillShowUI>
<Key></Key>
</ProductKey>
<AcceptEula>true</AcceptEula>
</UserData>
</component>
<component name="Microsoft-Windows-Setup" processorArchitecture="x86" 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>
<WillShowUI>OnError</WillShowUI>
</OSImage>
</ImageInstall>
<UserData>
<ProductKey>
<WillShowUI>OnError</WillShowUI>
<Key></Key>
</ProductKey>
<AcceptEula>true</AcceptEula>
</UserData>
</component>
</settings>
<settings pass="specialize">
<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-Security-Licensing-SLC-UX" processorArchitecture="x86" 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" 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">
<ShowWindowsLive>false</ShowWindowsLive>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ShowWindowsLive>false</ShowWindowsLive>
</component>
<component name="Microsoft-Windows-SystemRestore-Main" 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">
<DisableSR>1</DisableSR>
</component>
<component name="Microsoft-Windows-SystemRestore-Main" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DisableSR>1</DisableSR>
</component>
<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>
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="x86" 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>
<component name="Microsoft-Windows-IE-InternetExplorer" 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">
<FilterLevel>High</FilterLevel>
<PlaySound>false</PlaySound>
<ShowInformationBar>false</ShowInformationBar>
<DisableAccelerators>false</DisableAccelerators>
<DisableDevTools>true</DisableDevTools>
<DisableFirstRunWizard>true</DisableFirstRunWizard>
<EnableLinksBar>false</EnableLinksBar>
<DisableOOBAccelerators>true</DisableOOBAccelerators>
<Home_Page>http://www.google.com.br</Home_Page>
<SearchScopes>
<Scope wcm:action="add">
<ScopeDefault>true</ScopeDefault>
<ScopeDisplayName>Google</ScopeDisplayName>
<ScopeKey>SearchProvider1</ScopeKey>
<ScopeUrl>http://www.google.com.br/search?q={searchTerms}</ScopeUrl>
</Scope>
</SearchScopes>
</component>
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<FilterLevel>High</FilterLevel>
<PlaySound>false</PlaySound>
<ShowInformationBar>false</ShowInformationBar>
<DisableAccelerators>false</DisableAccelerators>
<DisableDevTools>true</DisableDevTools>
<DisableFirstRunWizard>true</DisableFirstRunWizard>
<EnableLinksBar>false</EnableLinksBar>
<DisableOOBAccelerators>true</DisableOOBAccelerators>
<Home_Page>http://www.google.com.br</Home_Page>
<SearchScopes>
<Scope wcm:action="add">
<ScopeDefault>true</ScopeDefault>
<ScopeDisplayName>Google</ScopeDisplayName>
<ScopeKey>SearchProvider1</ScopeKey>
<ScopeUrl>http://www.google.com.br/search?q={searchTerms}</ScopeUrl>
</Scope>
</SearchScopes>
</component>
<component name="Microsoft-Windows-ErrorReportingCore" 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">
<DisableWER>1</DisableWER>
</component>
<component name="Microsoft-Windows-ErrorReportingCore" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DisableWER>1</DisableWER>
</component>
</settings>
<settings pass="oobeSystem">
<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">
<OOBE>
<ProtectYourPC>3</ProtectYourPC>
<NetworkLocation>Home</NetworkLocation>
</OOBE>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Group>Administrators</Group>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<TimeZone>E. South America Standard Time</TimeZone>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<Description>WinRAR 3.90 x64</Description>
<Order>1</Order>
<CommandLine>%InstallDrive%\extras\winrar-x64-39br.exe /s</CommandLine>
</SynchronousCommand>
</FirstLogonCommands>
</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">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</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:\Autounattend.xml SETX InstallDrive %i:\ -m</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<ProtectYourPC>3</ProtectYourPC>
<NetworkLocation>Work</NetworkLocation>
</OOBE>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Group>Administrators</Group>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<TimeZone>E. South America Standard Time</TimeZone>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<Description>WinRAR 3.90</Description>
<Order>1</Order>
<CommandLine>%InstallDrive%\extras\winrar39br.exe /s</CommandLine>
</SynchronousCommand>
</FirstLogonCommands>
</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">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</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:\Autounattend.xml SETX InstallDrive %i:\ -m</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:/sources/install.wim#Windows 7 ULTIMATE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

I already try that code too:

<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:\Autounattend.xml SETX InstallDrive %i:\ -m"</Path>

But doesn't work anyway...

What wrong with my answer file?

thanks for help

Edited by Sydnelson
Link to comment
Share on other sites

  • 2 weeks later...

I am also experiencing similar problems with the OPK System Image Manager (WIAK for OEMs) since moving to the updated version for Windows 7.

The actual operating installs but I cannot seem to get ANYTHING to launch during audit mode or oobe. :wacko:

I use the DVD and USB flash drive with autounattend/configuration set method.

The files are being moved successfully to the local drive and once system is in audit mode I can launch the installs using the very same commands that were to be called during the audit mode pass.

A RunSyncronous Command in the Audit User pass used to accomplish the base utilities and app installs perfectly on Vista:

CMD /C %systemroot%\Factory\Utilities\myapp.exe /qn

Now I cannot seem to get anything kicked off or error out. It's as if it is being passed over completely.

I have seen mention of an %appsroot% variable not getting set but not really sure this is coming into play in this situation.

Thank you in advance for any ideas or help.

John

Link to comment
Share on other sites

Any reason why you need to run the command from the XML instead of using SetupComplete.cmd ?

Sources\$OEM$\$$\Setup\Scripts\SetupComplete.cmd

You can make further customizations after Windows Setup completes by adding commands to the %WINDIR%\Setup\Scripts\SetupComplete.cmd file. This file enables you to install additional applications, run custom Windows scripts (cscript/wscript), or make other modifications to the system before a user logs on.

Commands in the Setupcomplete.cmd file are executed with local system privilege.

After Windows is installed, but before the logon screen appears, Windows Setup searches for the SetupComplete.cmd file in the %WINDIR%\Setup\Scripts\ directory.

If a SetupComplete.cmd file is found, the file is executed. Otherwise, installation continues normally. Windows Setup logs the action in the Setupact.log file.

Link to comment
Share on other sites

Well I have managed to muddle through my issues and thought I would share my findings.

In creating the autounattend.xml through the WSIM/WIAK I found two problems that where causiing my issues.

1. In creating a x86 answer file, by using the menu item INSERT > Syncronous command the processorArchitecture was being inserted with an amd64 tag causing the sychronous commands to be passed over. You need to use the components panel (Lower Left) and add the appropriate type there.

2. The variable %systemroot% that work previously in WSIM/WIAK no longer works. You must use the legacy version %windir% to repesent the drive:\Windows folder. :wacko:

After making these adjustments my installs are once again UNATTENDED :thumbup

Hope this helps anyone having similar issues and good luck :hello:

Link to comment
Share on other sites

MrJinJie, is runonceex in xp closer to setupcomplete.cmd or firstlogoncommands?
LOL - FYI - It is sound like Jin-Jay, not Jin-Gee.

First logon commands run in the context of the user (most likely an adminstrator but not guaranteed), and SetupComplete.cmd always runs elevated.

SetupComplete.cmd runs immediately prior to first logon, First logon commands do not occur until after the first logon. SetupComplete finishes about 5-10 seconds before First Logon commands start. SetupComplete.cmd can make changes to the default user profile, and when done these changes will reflect in the new user profile created at first login, this cannot be done via First Login commands, as the new user profile would already be created before they run.

But the most important reason I prefer setupcomplete.cmd, is it takes normal batch commands vs First Logon using batch commands inside an XML block. Much easier to add, delete, and re-order commands using setupcomplete.cmd

Edited by MrJinje
Link to comment
Share on other sites

<RunSynchronous>

<RunSynchronousCommand wcm:action="add">

<Order>1</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:\Autounattend.xml SETX InstallDrive %i:\ -m</Path>

</RunSynchronousCommand>

</RunSynchronous>

</component>

</settings>

<cpi:offlineImage cpi:source="wim:/sources/install.wim#Windows 7 ULTIMATE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />

</unattend>

I already try that code too:

<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:\Autounattend.xml SETX InstallDrive %i:\ -m"</Path>

But doesn't work anyway...

Yes I know we are talking about an XML, but I am wondering how windows treats the commands inside the XML. Can anyone tell me if these Synchronous commands are being run from a Run command context (similar to a user typing them out), or if they run from inside the context of a .CMD file. The reason I ask is that inside a .CMD file you would need to specify 2 %% signs around your variables, but only 1 % sign if it runs via run command (similar to user typing them out). Does that even make sense to anyone ?

<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:\Autounattend.xml SETX InstallDrive %%i:\ -m</Path>

Edited by MrJinje
Link to comment
Share on other sites

MrJinJie, is runonceex in xp closer to setupcomplete.cmd or firstlogoncommands?
LOL - FYI - It is sound like Jin-Jay, not Jin-Gee.

First logon commands run in the context of the user (most likely an adminstrator but not guaranteed), and SetupComplete.cmd always runs elevated.

SetupComplete.cmd runs immediately prior to first logon, First logon commands do not occur until after the first logon. SetupComplete finishes about 5-10 seconds before First Logon commands start. SetupComplete.cmd can make changes to the default user profile, and when done these changes will reflect in the new user profile created at first login, this cannot be done via First Login commands, as the new user profile would already be created before they run.

But the most important reason I prefer setupcomplete.cmd, is it takes normal batch commands vs First Logon using batch commands inside an XML block. Much easier to add, delete, and re-order commands using setupcomplete.cmd

Ah, so what if I have customizations on applications, say, .ini files that reside in %appdata%. Thing is, appdata hasn't yet been created for the user.

Link to comment
Share on other sites

Ah, so what if I have customizations on applications, say, .ini files that reside in %appdata%. Thing is, appdata hasn't yet been created for the user.
See here, SetupComplete does have it's disadvantages. But I think these can be fixed with the <CopyProfile> setting via AutoUnattend.xml. Not fully sure, waiting for feedback from another reader.

If that don't work, the simple answer is any apps that are user profile specific need to be ran during First Login Commands.

ThinApp solves most these issues, so if you can get management to spring for licensing, do it. Most apps can be re-packaged as portable applications very easy.

Link to comment
Share on other sites

MrJinje, you are my hero! I knew there had to be a way to easily add default user profile settings! This is fantastic news! I don't have enough exclamation points to convey my joy! :)

I've been trying to get an answer on this from Microsoft, and it seems even their "experts" are ignorant. Check out the bottom of this thread where I ask Microsoft's "Deployment Guys" about this (last comment).

Now I can go back to recursively loading reg files, like I used to do at T-12 in XP/2003.

Edited by Noise
Link to comment
Share on other sites

  • 7 months later...

First logon commands run in the context of the user (most likely an adminstrator but not guaranteed), and SetupComplete.cmd always runs elevated.

SetupComplete.cmd runs immediately prior to first logon, First logon commands do not occur until after the first logon. SetupComplete finishes about 5-10 seconds before First Logon commands start. SetupComplete.cmd can make changes to the default user profile, and when done these changes will reflect in the new user profile created at first login, this cannot be done via First Login commands, as the new user profile would already be created before they run.

But the most important reason I prefer setupcomplete.cmd, is it takes normal batch commands vs First Logon using batch commands inside an XML block. Much easier to add, delete, and re-order commands using setupcomplete.cmd

Thanks a bunch MrJinje that is extremely helpful to me at this point. Have a good one.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...