Jump to content

Program Files installation on D: partition


Recommended Posts

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


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

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

@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

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