Jump to content

Run Simple Apps from Autounattend.xml


Recommended Posts


Well... I don't use WPI by myself, but others have told me they were starting it successfully with synchronous command. I will ask them, if they had the same problems...

Regards,

Martin

Edited by FireGeier
Link to comment
Share on other sites

The strange thing is, when its called by a cmd it gives the error

When started manualy, there is no error.

Ater i opened core.js , i saw the problem, it looks for files from xp.

Problem solved, thx again :thumbup

EDIT: WPI runs fine now, thx for the apps guide wich helped me start WPI

But your driver guide also did not work for me, same error as with the XML maker

Edited by sp00f
Link to comment
Share on other sites

@MarcJ and others how are interested:

Update:

After doing a lot of further test runs I still can't reproduce the problem you've having with synchronous command - doesn't matter if I use ULTIMATE or BUSINESS.

But if I do the same app installations with synchronous command in auditUser pass instead of oobeSystem pass, than setups aborts with an error. The %AppsRoot% variable is present in that pass I've checked that using the following synchronous command:

cmd /c SET > %AppsRoot%test_apps_root.txt

This will write a list of environment variables to test_apps_root.txt on %AppsRoot%. This command is executed without an problems.

But a command line like,

%AppsRoot%Install\AcrRead\AcroRead.msi /qb

will fail and setup is aborted.

It's not exactly the same problem like you have, but it's simlar and the solution is very simple:

Sure your solution with separat cmd works fine as well but the follwoing is a little bit easier:

Instead of

%AppsRoot%Install\AcrRead\AcroRead.msi /qb

just use

cmd /c %AppsRoot%Install\AcrRead\AcroRead.msi /qb

Thats at least not much different from putting everything together in one cmd file. But it's easier to handle and in auditUser pass especialy it gives you the option to use the build in Restart command.

Hope that'll help!

Regards,

Martin

Edited by FireGeier
Link to comment
Share on other sites

And how do i install, things like Alcohol & Daemontools?

Since SPTD needs to be installed first , and that needs a reboot before you can install those 2

Normaly i used to install SPTD from svcpack (XP)

Link to comment
Share on other sites

Hello sp00f!

To do a reboot you need:

1. Based on my Application guide add the following tow synchronous commands to your xml into sepcialize pass:

Synchronous Command 1:

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:\AppsRoot.txt SETX AppsRoot %i: -m"

This will set the AppsRoot environment variable.

Synchronous Command 2:

%WINDIR%\system32\sysprep\sysprep.exe /quiet /audit

This will boot to audit modes.

2. Instead of inserting all Synchronous Commands to install the apps to oobeSystem pass - like described in my guide - add them to auditUser pass.

It's important to start your command line with cmd /c! Otherwise the AppsRoot variable won't work!

Example:

Synchronous Command 1:

cmd /c REGEDIT /S %AppsRoot%\Install\Regtweaks.reg

Synchronous Command 2:

cmd /c %AppsRoot%\Install\AcrRead\AcroRead.msi /qb

Synchronous Command 3:

cmd /c %AppsRoot%\Install\Firefox\Firefox_Setup_2_0_0_2.exe -ms

etc.

Last Synchronous Command:

%WINDIR%\system32\sysprep\sysprep.exe /quiet /oobe /reboot

This commands needs to be at last position always and will forward you to oobeSystem pass. Otherwise system would boot in audit mode again and again.

Once you've insert a Synchronous Command to auditUser pass check out Properties pane in WSIM on the right and you will see, that the Synchronous Command gives you an option to set a value for Restart. Set it on Always, if you want to force a reboot after application was installed.

3. Add AutoLogon to auditSystem pass

Add Windows-Shell-Setup \ AutoLogon to auditSystem pass and log on the main Administrator (Administrator). Set LogonCount so that you can do enough reboots you need to do for your apps.

If you've any further questions you're welcome to ask!

Regards,

Martin

EDIT:

Sorry... added the wrong final command line you have to use /reboot like it is now instead of /quit like it was before.

Edited by FireGeier
Link to comment
Share on other sites

hi

having same problem with settings this variable

it doesnt install and when i check if %appsroot% exists,it doesnt

here is what im using:

You Type We Show

 
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<servicing></servicing>
<settings pass="windowsPE">
<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>
<InstallToAvailablePartition>false</InstallToAvailablePartition>
</OSImage>
</ImageInstall>
<UserData>
<ProductKey>
<WillShowUI>OnError</WillShowUI>
<Key>xxxxx-xxxxx-xxxxx-xxxxx-xxxxx</Key>
</ProductKey>
<AcceptEula>true</AcceptEula>
<FullName>demo</FullName>
<Organization>demo</Organization>
</UserData>
</component>
<component name="Microsoft-Windows-International-Core-WinPE" 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">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<InputLocale>0409:00000409</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback></UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
</settings>
<settings pass="oobeSystem">
<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">
<AutoLogon>
<Enabled>true</Enabled>
<LogonCount>2</LogonCount>
<Username>administrator</Username>
</AutoLogon>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<NetworkLocation>Home</NetworkLocation>
<ProtectYourPC>1</ProtectYourPC>
<SkipMachineOOBE>true</SkipMachineOOBE>
<SkipUserOOBE>true</SkipUserOOBE>
</OOBE>
<TimeZone>Eastern Standard Time</TimeZone>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<CommandLine>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:\AppsRoot.txt SETX AppsRoot %i:\ -m"</CommandLine>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>2</Order>
<CommandLine>%AppsRoot%Install\Java\jre-1_5_0_11-windows-i586-p.exe /s /v/qn</CommandLine>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:f:/vistawork/dvd/sources/install.wim#Windows Vista ULTIMATE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

i also have the right folders set on my ultimate dvd

ofcourse if i run the cmd after vista is installed the variable gets set right

any ideas whats going on here?

Link to comment
Share on other sites

Hello turbomcp!

You need to set the %AppsRoot% variable during specialize pass! Thats is very important!

If you should still have problems to use %AppsRoot% variable, add cmd /c in front of your command line:

				<SynchronousCommand wcm:action="add">
<Order>2</Order>
<CommandLine>cmd /c %AppsRoot%Install\Java\jre-1_5_0_11-windows-i586-p.exe /s /v/qn</CommandLine>
</SynchronousCommand>

Regards,

Martin

EDIT:

Explanation:

Between specialize pass and oobeSystem pass the system is rebooting, so the system envrionment with environment variables is loaded again and so the added %AppsRoot% variable is present for the session.

If you put it to the system environment in the same pass, than the environment is not reloaded to the setup process and so the %AppsRoot% variable can't be read even it is set already!

Edited by FireGeier
Link to comment
Share on other sites

Manually edit your autounattend.xml to fix the quotes around your command. It *may* not matter but Vista is so picky about everything else, it might make a difference. I know that WAIK puts it in there like that.

<CommandLine>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:\AppsRoot.txt SETX AppsRoot %i:\ -m"</CommandLine>

should be this

<CommandLine>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:\AppsRoot.txt SETX AppsRoot %i:\ -m"</CommandLine>
Link to comment
Share on other sites

The run.cmd works ok for me. Do you install your apps off DVD or do you use a USB stick? I'm using a stick.

I have random times that it won't work...using the exact same stick, system, and isntall DVD. The only thing that changes is that I edit the reg file that I import. But sometimes it can't set the diskconfiguration, and I just had it give an error that says can display images used in setup. Earlier today, the install appeared to go perfectly but even the run.cmd file didn't execute. This is on a brand new Dell Dimension E520 that I opened so it's not a weird system. A reboot or two gets it working. I'm wondering if there is something flakey with the USB stick being read. I haven't removed the install DVD in days so it's not a media issue.

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