breinonline Posted April 17, 2004 Share Posted April 17, 2004 I started at my own unattended install cd a while ago. The cd works pretty well, but there’s is one more thing I would like to automate.My hard drive is partitioned in several partitions. After the installation of Windows itself I first install a register editor and change the all the phrases “C:\Program Files\” to “D:\Program Files” with the search & replace function. Than I copy the Program Files directory to the D: partition. After a reboot I can delete the Program Files directory on the C: partition. Any other programs I install after that will have the right installation path because this path is also changed in the registry. (The following keys are responsible for that: (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProgramFilesDir and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProgramFilesPath) )First I searched for a command-line editor to change the registry settings out of a cmd window. I found a MS tool what can change registry keys, but it can’t search & replace. I also found a tool which has a search & replace option but it will cost $44.95.My question now is: is there any way to change the Program Files path with a (free) tool after the installation of Windows or is there even a better solution? Maybe it is possible to change the Program Files path during the installation of Windows (somewhere at the beginning of the GUI-mode setup?) so nothing has to be changed afterwards. When that is possible how can I avoid an additional problem of the D: partition that is not formatted at that point? Link to comment Share on other sites More sharing options...
airmr Posted April 17, 2004 Share Posted April 17, 2004 Change the Path to "Programm Files" at the 12 min Mark when installing wit a regpatch.The D Partition has to be formatted for that though, otherwise you get an error. Link to comment Share on other sites More sharing options...
breinonline Posted April 17, 2004 Author Share Posted April 17, 2004 Then it should be possible to format de drive first at that point with the format command (FORMAT D: /FS:NTFS), I presume?Can anyone tell me how far the registry entries are already entered at that point? When there are already entries containing the old C: path I will get a mix of two paths in the end. Link to comment Share on other sites More sharing options...
big_gie Posted April 17, 2004 Share Posted April 17, 2004 Just put this in your winnt.sif:[unattended] UnattendMode=FullUnattended OemSkipEula=Yes OemPreinstall=Yes TargetPath=\WINDOWS ProgramFilesDir="D:\" CommonProgramFilesDir="D:\FichiersCommuns"Thats what I'm using and I don't have a "C:\Program Files" folder No need to delete it, search the registry, copying files... Link to comment Share on other sites More sharing options...
breinonline Posted April 17, 2004 Author Share Posted April 17, 2004 That is what I was looking for! At which point do you format your D: partition? Can it be done during the unattended installation or will I have to format the partition before installing? Link to comment Share on other sites More sharing options...
big_gie Posted April 17, 2004 Share Posted April 17, 2004 I prefer keeping control of the format since I don't want to accidently format my personal data...I use Partition Expert 2003 Link to comment Share on other sites More sharing options...
XtremeMaC Posted April 18, 2004 Share Posted April 18, 2004 @breinonline u have to format it b4 hand bc if u don't format it its gonna fail when copying files to d drive,i'm using partition magic 8 along with cdshell ini from multiboot guide its working perfectly.. 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