Jump to content

Unattended install of programs on another drive.


Recommended Posts

Hi, i have a question again.

I have all my programs installed on another partition that is on another harddisk.

Can i make an unattended install and tell the setup that it should install the files on another partition? For example, i have c: as my system drive, and i want that all my programs are on d:.

I thought I could make a batch file, that find's the right partition, and sets the varible to this drive.

For example:

if exist d:\programs.partition set %ProgramFiles% d:

if exist e:\programs.partition set %ProgramFiles% e:

and so on.

I know i have to make the file before i install windows, but thats not the problem.

Can i also execute format.com in windows setup with the cmdfiles.txt?

So i could format the drive before it install's anything there.

For example:

if exist d:\program.partition format.com d: /q && set %ProgramFiles% d:

if exist e:\program.partition format.com e: /q && set %ProgramFiles% e:

After formating and setting the variable i could just install the application as usual.

Would that work the way i want it to?

Link to comment
Share on other sites


I am working on this myself. I made the default Docs And settings partition D: and the the default Prog files parttion E:

So what I was thinking is that on the batch file I created, instead of putting the programs in $OEM$\1$\Install

Put them in $OEM$\$Progs and change the batch to read %Progs% Instead of %systemdrive%

Was just searching ofr the right thing to do when I came across this.

Any help?

Link to comment
Share on other sites

how does Windows size these partitions? 

In other words, if I use

C:\WINDOWS

D:\Program Files

E:\Documents and Settings

Does it allocate the partitions 33/33/33% ?

If so I guess one could always resize with some partition manager program.

You set your CD to install a preform partition guide, or set it up to require user input.

I did this in my answer file.

;SetupMgrTag
[Data]
   AutoPartition=0
   MsDosInitiated="0"
   UnattendedInstall="Yes"
   AutomaticUpdates=yes

Link to comment
Share on other sites

Yeah I like manually creating the partitions, and yes you can have it set to happen automatically, I chose not to.

Prefernce is all.

Killer

[Unattended]
   UnattendMode=FullUnattended
   OemSkipEula=Yes
   OemPreinstall=Yes
   UnattendSwitch="yes"
   TargetPath=\WINDOWS
   FileSystem=*
   WaitForReboot="No"
   DriverSigningPolicy=Ignore
   ProgramFilesDir="E:\My Program Files"
   CommonProgramFilesDir="E:\My Program Files\My Common Files"
   KeyboardLayout="US"

is one part

[GuiUnattended]
   AdminPassword=0f5f9e9d8edc191fb09321e47427af3cfdc91d1ef721ed30df5fb0c9968d0216
   EncryptedAdminPassword=Yes
   OEMSkipRegional=1
   TimeZone=35
   OemSkipWelcome=1
   ProfilesDir="D:\Documents and Settings\"

Isthe other..

hmm I just noticed the script I copied says My Program files, and My Common Files.. I imagine you can remove that ;)

Link to comment
Share on other sites

thanks neuro42 i will have to try this out soon, sounds interesting and useful for some installs.

About the original question, I think you already answered it.

If you 'set' in winnt.sif Program Files or Doc&Set to a different partition then won't Windows use that by default?

OR if your using runonceex and trying to point it to the Files you want to install, then put them in a folder on the cd NOT within $OEM$ (ex. Software) and use this code:

cmdow @ /HID
@echo off

for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%a:\win51ip.SP2 set CDROM=%%a:

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%\010 /VE /D "Adobe Reader 6.02" /f
REG ADD %KEY%\010 /V 1 /D "%CDROM%\Software\acroread602.exe" /f

EXIT

Link to comment
Share on other sites

Ok, i tried that yesterday with vmware and it didn't work the way i wanted it.

Thats my batch file:

@echo off
echo.
echo Search and prepare program files partition...
if exist d:\program.par format.com d: /FS:NTFS && set ProgramFiles=d:\Program Files
if exist e:\program.par format.com e: /FS:NTFS && set ProgramFiles=e:\Program Files
if exist f:\program.par format.com f: /FS:NTFS && set ProgramFiles=f:\Program Files
if exist g:\program.par format.com g: /FS:NTFS && set ProgramFiles=g:\Program Files
if exist h:\program.par format.com h: /FS:NTFS && set ProgramFiles=h:\Program Files
if exist i:\program.par format.com i: /FS:NTFS && set ProgramFiles=i:\Program Files
if exist j:\program.par format.com j: /FS:NTFS && set ProgramFiles=j:\Program Files
if exist k:\program.par format.com k: /FS:NTFS && set ProgramFiles=k:\Program Files
if exist l:\program.par format.com l: /FS:NTFS && set ProgramFiles=l:\Program Files
if exist m:\program.par format.com m: /FS:NTFS && set ProgramFiles=m:\Program Files
if exist n:\program.par format.com n: /FS:NTFS && set ProgramFiles=n:\Program Files
if exist o:\program.par format.com o: /FS:NTFS && set ProgramFiles=o:\Program Files
if exist p:\program.par format.com p: /FS:NTFS && set ProgramFiles=p:\Program Files
if exist q:\program.par format.com q: /FS:NTFS && set ProgramFiles=q:\Program Files
if exist r:\program.par format.com r: /FS:NTFS && set ProgramFiles=r:\Program Files
if exist s:\program.par format.com s: /FS:NTFS && set ProgramFiles=s:\Program Files
if exist t:\program.par format.com t: /FS:NTFS && set ProgramFiles=t:\Program Files
if exist u:\program.par format.com u: /FS:NTFS && set ProgramFiles=u:\Program Files
if exist v:\program.par format.com v: /FS:NTFS && set ProgramFiles=v:\Program Files
if exist w:\program.par format.com w: /FS:NTFS && set ProgramFiles=w:\Program Files
if exist x:\program.par format.com x: /FS:NTFS && set ProgramFiles=x:\Program Files
if exist y:\program.par format.com y: /FS:NTFS && set ProgramFiles=y:\Program Files
if exist z:\program.par format.com z: /FS:NTFS && set ProgramFiles=z:\Program Files
echo.
echo Done, your program path is %ProgramFiles%.
echo.
echo Search CD-Rom Drive...
echo.
if exist d:\win51ip.SP2 set cdrom=D:
if exist e:\win51ip.SP2 set cdrom=E:
if exist f:\win51ip.SP2 set cdrom=F:
if exist g:\win51ip.SP2 set cdrom=G:
if exist h:\win51ip.SP2 set cdrom=H:
if exist i:\win51ip.SP2 set cdrom=I:
if exist j:\win51ip.SP2 set cdrom=J:
if exist k:\win51ip.SP2 set cdrom=K:
if exist l:\win51ip.SP2 set cdrom=L:
if exist m:\win51ip.SP2 set cdrom=M:
if exist n:\win51ip.SP2 set cdrom=N:
if exist o:\win51ip.SP2 set cdrom=O:
if exist p:\win51ip.SP2 set cdrom=P:
if exist q:\win51ip.SP2 set cdrom=Q:
if exist r:\win51ip.SP2 set cdrom=R:
if exist s:\win51ip.SP2 set cdrom=S:
if exist t:\win51ip.SP2 set cdrom=T:
if exist u:\win51ip.SP2 set cdrom=U:
if exist v:\win51ip.SP2 set cdrom=V:
if exist w:\win51ip.SP2 set cdrom=W:
if exist x:\win51ip.SP2 set cdrom=X:
if exist y:\win51ip.SP2 set cdrom=Y:
if exist z:\win51ip.SP2 set cdrom=Z:
echo CD-Rom Drive is %cdrom%
echo.
echo.
echo Install Programs...
echo.
echo Adobe Reader 6.02...
start /wait %cdrom%\apps\acroread602.exe
echo.
echo Done!
echo.
echo Java Runtime Environment 5.0
start /wait %cdrom%\apps\jre5.exe
echo.
echo Done!
echo.
echo Apply registry tweaks...
start /wait regedit /s regtweaks.reg
echo.
echo Done!
echo.
echo.
echo.
echo Finished everything, WindowsXP setup will finish the rest...
exit

First of all the format process is not unattended, but i think i could find out how to do that.

The other problem is that the apps still install on c:\

Link to comment
Share on other sites

In my organisation we are using this partition scheme:

C:\Windows

D:\Program Files

E:\Documents and Settings

You have to specify theses in your Winnt.sif:

[Unattended]
   ProgramFilesDir="D:\Program Files"
   CommonProgramFilesDir="D:\Program Files\Common files"

You can also specify the location of Documents and Setting here:

[GuiUnattended]
   ProfilesDir="E:\Documents and Settings\"

BUT be aware that your partitions MUST be partitionned and formated BEFORE you launch your Unattended Installation... Otherwise you will get an error because Windows only format the destination drive (default = C:\Windows)

Also don't use Partition Magic (all versions !) to do this on Windows 2000, it won't work. Use Acronis Disk Director 9 Suite instead (wich contains Partition Expert)

Link to comment
Share on other sites

Okay that is the problem I have been running into with VM Ware. The second and third partitions are not formatted NTFS

I keep getting Anything sent o $Progs as not found.

Just one quick question.

I put the apps I want installed to E: Progam Files into $OEM$\$Progs, but was just wondering what the %name% should be in the Batch File.

I think Windows uses %Programs% As default for Program Files

But since the CD uses $Progs, should I be using that?

As in

ECHO Installing SPYBOT

ECHO Please wait...

start /wait %Programs%\spybot\spybotsd13.exe /silent

ECHO.

ECHO Installing SPYBOT

ECHO Please wait...

start /wait %Programs%\spybot\update.exe /silent

ECHO.

ECHO Installing Sygate Personal Firewall

ECHO Please Wait

start /wait %Programs%\FW\spf.exe /QN Reboot=Supress

ECHO.

ECHO Installing Office 2003

ECHO Please wait...

start /wait %Programs%\Office\PRO11.msi /QB

ECHO.

Link to comment
Share on other sites

Okay by preformatting the 3 drives I got most of the problems fixed in VM Ware

It created 2 Program Files folders though. One on c: and one of E:

I need to figure out how to get rid of the one on C:

Then I think I can edit my batch to run E:\Program Files\Whatever

rather then using variables.

Gonna lok for a cure to the C:\PFiles issue and figure out why my autologon reg tweak is not working :(

Then recompile as ISO and off I go !!

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