KiLLERHOLiC Posted December 19, 2004 Share Posted December 19, 2004 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 More sharing options...
neuro42 Posted December 20, 2004 Share Posted December 20, 2004 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$\InstallPut 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 More sharing options...
DigeratiPrime Posted December 20, 2004 Share Posted December 20, 2004 how does Windows size these partitions? In other words, if I useC:\WINDOWSD:\Documents and SettingsE:\Program FilesDoes it allocate the partitions 33/33/33% ?If so I guess one could always resize with some partition manager program. Link to comment Share on other sites More sharing options...
neuro42 Posted December 20, 2004 Share Posted December 20, 2004 how does Windows size these partitions? In other words, if I useC:\WINDOWSD:\Program FilesE:\Documents and SettingsDoes 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 More sharing options...
DigeratiPrime Posted December 20, 2004 Share Posted December 20, 2004 ok so you manually created and sized them?but it can also be done with a partition guide. Link to comment Share on other sites More sharing options...
neuro42 Posted December 20, 2004 Share Posted December 20, 2004 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 More sharing options...
DigeratiPrime Posted December 20, 2004 Share Posted December 20, 2004 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 offfor %%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\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%\010 /VE /D "Adobe Reader 6.02" /fREG ADD %KEY%\010 /V 1 /D "%CDROM%\Software\acroread602.exe" /fEXIT Link to comment Share on other sites More sharing options...
KiLLERHOLiC Posted December 20, 2004 Author Share Posted December 20, 2004 Ok, i tried that yesterday with vmware and it didn't work the way i wanted it.Thats my batch file:@echo offecho.echo Search and prepare program files partition...if exist d:\program.par format.com d: /FS:NTFS && set ProgramFiles=d:\Program Filesif exist e:\program.par format.com e: /FS:NTFS && set ProgramFiles=e:\Program Filesif exist f:\program.par format.com f: /FS:NTFS && set ProgramFiles=f:\Program Filesif exist g:\program.par format.com g: /FS:NTFS && set ProgramFiles=g:\Program Filesif exist h:\program.par format.com h: /FS:NTFS && set ProgramFiles=h:\Program Filesif exist i:\program.par format.com i: /FS:NTFS && set ProgramFiles=i:\Program Filesif exist j:\program.par format.com j: /FS:NTFS && set ProgramFiles=j:\Program Filesif exist k:\program.par format.com k: /FS:NTFS && set ProgramFiles=k:\Program Filesif exist l:\program.par format.com l: /FS:NTFS && set ProgramFiles=l:\Program Filesif exist m:\program.par format.com m: /FS:NTFS && set ProgramFiles=m:\Program Filesif exist n:\program.par format.com n: /FS:NTFS && set ProgramFiles=n:\Program Filesif exist o:\program.par format.com o: /FS:NTFS && set ProgramFiles=o:\Program Filesif exist p:\program.par format.com p: /FS:NTFS && set ProgramFiles=p:\Program Filesif exist q:\program.par format.com q: /FS:NTFS && set ProgramFiles=q:\Program Filesif exist r:\program.par format.com r: /FS:NTFS && set ProgramFiles=r:\Program Filesif exist s:\program.par format.com s: /FS:NTFS && set ProgramFiles=s:\Program Filesif exist t:\program.par format.com t: /FS:NTFS && set ProgramFiles=t:\Program Filesif exist u:\program.par format.com u: /FS:NTFS && set ProgramFiles=u:\Program Filesif exist v:\program.par format.com v: /FS:NTFS && set ProgramFiles=v:\Program Filesif exist w:\program.par format.com w: /FS:NTFS && set ProgramFiles=w:\Program Filesif exist x:\program.par format.com x: /FS:NTFS && set ProgramFiles=x:\Program Filesif exist y:\program.par format.com y: /FS:NTFS && set ProgramFiles=y:\Program Filesif exist z:\program.par format.com z: /FS:NTFS && set ProgramFiles=z:\Program Filesecho.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.exeecho.echo Done!echo.echo Java Runtime Environment 5.0start /wait %cdrom%\apps\jre5.exeecho.echo Done!echo.echo Apply registry tweaks...start /wait regedit /s regtweaks.regecho.echo Done!echo.echo.echo.echo Finished everything, WindowsXP setup will finish the rest...exitFirst 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 More sharing options...
Nologic Posted December 20, 2004 Share Posted December 20, 2004 hmm couldn't you say install\run TweakUI via a AutoIt script to alter those settings prior to the installation of the rest of your files? Link to comment Share on other sites More sharing options...
Incroyable HULK Posted December 20, 2004 Share Posted December 20, 2004 In my organisation we are using this partition scheme:C:\WindowsD:\Program FilesE:\Documents and SettingsYou 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 More sharing options...
neuro42 Posted December 20, 2004 Share Posted December 20, 2004 Okay that is the problem I have been running into with VM Ware. The second and third partitions are not formatted NTFSI 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 inECHO Installing SPYBOTECHO Please wait...start /wait %Programs%\spybot\spybotsd13.exe /silent ECHO.ECHO Installing SPYBOTECHO Please wait...start /wait %Programs%\spybot\update.exe /silentECHO.ECHO Installing Sygate Personal FirewallECHO Please Waitstart /wait %Programs%\FW\spf.exe /QN Reboot=Supress ECHO.ECHO Installing Office 2003ECHO Please wait...start /wait %Programs%\Office\PRO11.msi /QBECHO. Link to comment Share on other sites More sharing options...
Incroyable HULK Posted December 20, 2004 Share Posted December 20, 2004 There is a %ProgramFiles% variable but it doesn't seem to work...Read HEREAnyway I think you can try :start /wait "%systemdrive%\program files\spybot\spybotsd13.exe" /silent Link to comment Share on other sites More sharing options...
neuro42 Posted December 20, 2004 Share Posted December 20, 2004 Okay by preformatting the 3 drives I got most of the problems fixed in VM WareIt 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\Whateverrather 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 More sharing options...
Incroyable HULK Posted December 20, 2004 Share Posted December 20, 2004 Having a second (almost empty) Program Folder on the C: drive is mostly caused by stupid software maker (or installer maker) wich doesn't look in the registry to find the %ProgramFiles% variable and systematicaly going straight to the C: Drive without too much questions! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now