Jump to content

Specifying "Program Files" folder


Recommended Posts

When I install XP on my systems, I like to install many of my program files onto another partition (which I call 'archive') separate from the XP partition, so when I backup using Ghost, the file will be as small as possible.

This introduces a problem during unattended. As every system is different, there's no way for me to foresee which disk/partition my 'archive' partition will reside in. During unattended, the RunOnceEx simply installs all the programs in whichever partition XP happened to be installed to, or %SYSTEMDRIVE%.

I've put a blank txt file named 'arc.txt' into the root directory of my 'archive' partition, and succeeded in doing:

IF EXIST F:\arc.txt SET ARC=F:\Program Files\

IF EXIST G:\arc.txt SET ARC=G:\Program Files\

and so on....

The problem is, I don't know how to set the installation destination to %ARC% in my RunOnceEx batch file. Of course an easier method might be to set my default 'Program Files' folder to %ARC% in my winnt.sif. However, the %ARC% variable cannot set there, if I'm not mistaken.

Anybody have any ideas?? :unsure:

Link to comment
Share on other sites


hmmm.....

what you could do....though I'm not sure if it will work.....

change the registry value....

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion]

ProgramFilesDir to your %ARC% value, using REG.EXE from where you're declaring ARC.

Then redefine %Programfiles% in that command instance, and possibly even in the Session Manager to your %ARC% value.

I'm not sure if this works, so you'd have to test. However, you MAY needed to run the ARC declaring batch file during CMDLINES.TXT or something and install the applications during RunOnceEX to get the effect. I'm not sure....

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