Jump to content

Installing apps from external source


 Share

Recommended Posts

Rather then creating a new DVD every time I change what apps I want installed during my unattended install I use this method.

In my Autounattend.xml in the oobeSystem pass I use the following.

	  <FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<CommandLine>%systemroot%\system32\install.bat</CommandLine>
<Description>install batch file</Description>
<Order>1</Order>
</SynchronousCommand>
</FirstLogonCommands>

On the DVD I put the install.bat file to be copied to the system32 folder.

Use $OEM$ folders or inject it into the install.wim image.

install.bat

@echo off
cd /d %~dp0

FOR %%j IN (D E F G H I J K L M) DO IF EXIST %%j:\external.txt SET EXTERNAL=%%j:

if exist %EXTERNAL%\Vista\Install\tweaks.bat start /wait %EXTERNAL%\Vista\Install\tweaks.bat

if exist %EXTERNAL%\Vista\Install\tweaks.reg REGEDIT /S %EXTERNAL%\Vista\Install\tweaks.reg

exit

What that does is checks the root of every drive for an external.txt file and sets the drive letter to it when found.

Then if the files on the drive exist eg. D:\Vista\install\tweaks.bat they are executed.

The command at <FirstLogonCommands> is launched with elevated privileges and all commands launched from that also have inherited elevated privileges.

The install.bat file on the DVD never has to be changed. All my tweaks and program installs are done from the two files on my other hard drive. It's a lot easier to just change them then create a new DVD every time. They should even install quicker since they run from a hard drive and not a DVD.

The "cd /d %~dp0" command is not needed in this batch I always include out of habit. You should perhaps include it in your external batch file if you use relative paths to make sure the command prompt is located at the location of the external batch file.

I've been doing it this way with XP for years. Works fine with Vista as well.

Good luck!

Link to comment
Share on other sites


Nice! Thanks for the tip. This will *definitely make it a lot easier. I beta test apps a lot, and change default programs here and there, so doing it your method, with 3 HDs available to me, makes it a lot easier to make 1 DVD and change the apps as they get updated or replaced. Ingenious!

Link to comment
Share on other sites

I've taken this one step further now. I moved my install.wim from the DVD to the hard drive and referenced it in my Autounattend.xml and put the Autounattend.xml on my floppy. (yes I still have a floppy. first time I've used it in years)

	  <ImageInstall>
<OSImage>
<InstallFrom>
<Path>D:\Vista\Build\Image\install.wim</Path>
<MetaData wcm:action="add">
<Key>/IMAGE/NAME</Key>
<Value>Windows Vista (vLite) HOMEPREMIUM</Value>
</MetaData>
</InstallFrom>
<InstallToAvailablePartition>false</InstallToAvailablePartition>
<WillShowUI>OnError</WillShowUI>
</OSImage>
</ImageInstall>

<Path>D:\Vista\Build\Image\install.wim</Path> is the important part.

My install disc is now a 314 Mb CD and never has to be changed. No more DVDs in the garbage after updates! :thumbup

It installs a bit quicker off the hard drive too.

Link to comment
Share on other sites

Nice! Thanks for the tip. This will *definitely make it a lot easier. I beta test apps a lot, and change default programs here and there, so doing it your method, with 3 HDs available to me, makes it a lot easier to make 1 DVD and change the apps as they get updated or replaced. Ingenious!
VistaUA and UnattendXP by MaxXpsoft does this it has a RunOnce tester you can select from any drive that has an APPS folder and select what programs you want to test i,e install. or you can make cd/dvd but install the APPS from other drives.
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...