Jump to content

Run Simple Apps from Autounattend.xml


Recommended Posts

Hello,

I just want to install applications when installing Vista.

i have seen the tuto : Installing Applications from media (http://www.msfn.org/board/index.php?showtopic=95462)

Why this doesn't work ? no errors but install nohting.

Thx.

--------------------------

<?xml version="1.0" encoding="utf-8"?>

<unattend xmlns="urn:schemas-microsoft-com:unattend">

<settings pass="specialize">

<component name="Microsoft-Windows-Deployment" 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">

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

</RunSynchronousCommand>

</RunSynchronous>

</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">

<FirstLogonCommands>

<SynchronousCommand wcm:action="add">

<Order>1</Order>

<CommandLine>REGEDIT /S %AppsRoot%\install\aero.reg</CommandLine>

</SynchronousCommand>

<SynchronousCommand wcm:action="add">

<Order>2</Order>

<CommandLine>%AppsRoot%install\reader8\AcroRead.msi /qb</CommandLine>

</SynchronousCommand>

<SynchronousCommand wcm:action="add">

<Order>3</Order>

<CommandLine>%AppsRoot%install\java6.exe /s /v/qn</CommandLine>

</SynchronousCommand>

<SynchronousCommand wcm:action="add">

<Order>4</Order>

<CommandLine>%AppsRoot%install\winrar.exe /s</CommandLine>

</SynchronousCommand>

<SynchronousCommand wcm:action="add">

<Order>5</Order>

<CommandLine>%AppsRoot%install\msn8\MsnMsgs.msi /quiet /norestart</CommandLine>

</SynchronousCommand>

</FirstLogonCommands>

</component>

</settings>

<cpi:offlineImage cpi:source="wim:e:/vista/ultimat3/sources/install.wim#Windows Vista (vLite) ULTIMATE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />

</unattend>

Link to comment
Share on other sites


Hello stellarzork,

if you open a command prompt in your ready unattended installed Vista and type SET only, do you see an entry called AppsRoot in that list?

Regards,

Martin

Edited by FireGeier
Link to comment
Share on other sites

Ok... that does mean AppsRoot variable isn't set properly. And if it's not set properly setup will not find the pathes to install directories. Do you install on VM or real PC. Did you ckecked the log files - setuperr.log and setupact.log - located in %Windir%\Panther\Unattend GC.

Please post them here and your full Autounattend.xml (without Product Key), too.

Do you have the AppsRoot.txt on your DVD\Stick? Do you may have labeld it AppsRoot.txt.txt? Enable file extension view to find out in Explorer.

Regards,

Martin

Edited by FireGeier
Link to comment
Share on other sites

Shouldn't your install path be this:

%AppsRoot%\install

and not this:

%AppsRoot%install

%AppsRoot%install is the right way (without "\"), cause

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"

will set the "\" already. So %AppsRoot%\install will be interpreted for example as D:\\install. And this would fail!

If not, then your regedit line is wrong.

MarcJ you're right. The line was wrong, unfortunatly. :( Have corrected it already. :thumbup

But this does not explain, why stellarzork has no AppsRoot variable in the final Vista installation.

Regards,

Martin

Link to comment
Share on other sites

Hello,

Thx for your help. I finaly found the solution.

Here are my codes that install a vista ultimate full automated (just the choice & options for hard disk) and install softwares silently.

You will have to create a empty ''AppsRoot.txt'' file in the DVD root and create a ''install'' folder.

In the ''install'' folder create a file : ''run.cmd''

sample of my ''run.cmd'' :

start /wait %AppsRoot%install\reader8\AcroRead.msi /qb

start /wait %AppsRoot%install\java6.exe /s /v/qn

start /wait %AppsRoot%install\winrar.exe /s

start /wait %AppsRoot%install\msn81\MsnMsgs.msi /quiet /norestart

Sorry for my poor english, i'm french.

Autounattend.xml

Link to comment
Share on other sites

...

You will have to create a empty ''AppsRoot.txt'' file in the DVD root and create a ''install'' folder.

In the ''install'' folder create a file : ''run.cmd''

sample of my ''run.cmd'' :

start /wait %AppsRoot%install\reader8\AcroRead.msi /qb

start /wait %AppsRoot%install\java6.exe /s /v/qn

start /wait %AppsRoot%install\winrar.exe /s

start /wait %AppsRoot%install\msn81\MsnMsgs.msi /quiet /norestart

...

Hello stellarzork!

Good to hear that it's working now. But I don't see the difference between your and my solution. :unsure:

Same thing should work without using the run.cmd and it should be still full unattended. But than it would be my solution described here again.

Do I have to explain the whole thing better may be?

Or is the run.cmd a must for you, to get it work? That would mean different solutions on different systems.

Do have some others may tried out the application install described in guide?

Thanks,

Martin

Link to comment
Share on other sites

Hello spOOf!

Yes, you can.

Regards,

Martin

So that would be :

%AppsRoot%Install\WPI\WPI.hta

?

And it starts just like ut did in XP? after first logon?

I know this is not the WPI part of the forum, but maybe you know this.

In WPI can i still use the %CDROM% ?

Link to comment
Share on other sites

I used your method first FireGeier and it would not work no matter what I did. There were no errors in the setuplog and the setuplog even showed the proper commands being issued.

I then tried stellarzork's method using the run.cmd file and it worked like a charm.

I agree with you FireGeier, there should be no difference between those two methods really. If the run.cmd file is getting executed, so should any other FirstLogonCommands. The only thing I can think of is that maybe when using your method on our machines, the application install never completes before setup continues. But, by using the run.cmd, setup is halted by the open cmd window, allowing the installs to complete.

Link to comment
Share on other sites

@sp00f:

%AppsRoot%Install\WPI\WPI.hta

Yes... it should work like this. In WPI you would have to use %AppsRoot% variable instead of %CDROM%. If you don't like this, than adapt the following line:

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"

change it to:

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 CDROM %i:\ -m"

Than you would have to call WPI with:

%CDROM%Install\WPI\WPI.hta

Hope, you understand what I'm talking about.

@MarcJ:

Well a synchronous command call is doing the same like start /wait... or should I better say supposed to do the same. :)

And it's working on my system like it supposed to be.

What Vista Version are you using?

However... thank you very much for the feedback... cause I need to add a note to the guide than. But I still do not understand the whole thing... :unsure:

I will try to reproduce the problem...

Regards,

Martin

Link to comment
Share on other sites

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 CDROM %i:\ -m"

I changed this to:

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"

I took out the \ after the drive letter so that commands look cleaner like

%AppsRoot%\Install\WPI\WPI.hta

Well a synchronous command call is doing the same like start /wait... or should I better say supposed to do the same. :)

And it's working on my system like it supposed to be.

What Vista Version are you using?

However... thank you very much for the feedback... cause I need to add a note to the guide than. But I still do not understand the whole thing... :unsure:

I don't understand it either why it's not working properly. I'm using Vista Business from an Upgrade DVD but doing a clean install with it.

Link to comment
Share on other sites

...

I changed this to:

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"

I took out the \ after the drive letter so that commands look cleaner like

%AppsRoot%\Install\WPI\WPI.hta

...

Well I'm thinking about changing this to make it less confusing. But at least it doesn't realy matter...

... I'm using Vista Business from an Upgrade DVD but doing a clean install with it.

That's good to know. I will start a Business Install than later. But I don't have an upgrade DVD just the full version.

Regards,

Martin

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