Jump to content

Forcing Apps to install to a specific place


Recommended Posts

Hello all. Ive been using the resources on this site for a couple months now playing around with unattended XP Pro installs for my home computers. I havent ventured much into the RunOnceEx stuff yet as I have been more or less experimenting with what stuff I can take out, services I can turn off and so on, trying to document all that Ive been trying and Ive got it pretty much lined out on that front. Ive got IE8, WMP11 and .Net Framework 3.5 integrated. I started with an XP Pro source CD with SP3 that I burned back in 2008.

I think now its time to turn the corner on the RunOnceEX stuff and try to install the apps I frequently use (mostly open source/free stuff) but a few commercial pieces as well. I think I understand how to use the RunOnce commands, but the issue I have is I like to install my apps in places other than the default 'My Programs' folder. I know, I know, Im just flaky that way I guess.

My question is how can I use the RunOnceEx commands to force the program to install to a custom location? For instance, taken from Unattended guide:

REG ADD %KEY%\005 /VE /D "Adobe Reader 6" /f
REG ADD %KEY%\005 /V 1 /D "%systemdrive%\install\AdobeReader6\AR6.msi /qn" /f

If I understand correctly, the above code will run the AR6.msi from the install folder that has been copied over as part of the install process and will install Adobe Reader in its default location, something like My Programs\Adobe\Adobe Reader.

I like my programs installed in the root directory and I organize them from there. Utilities, System, Security, Mozilla, folders like that and place each app in a folder based on its purpose. Just helps me find it and keep track of it and I guess Im just anal like that.

Anyway, how can I use the above code for other apps to force them to install to a location other than the default? Ive thought about changing the Windows default My Programs location in nLite to point to the root drive but I dont know how effective that would be nor how wise.

Link to comment
Share on other sites


Some installer-types supports specifying the install-directory through a command-line parameter e.g. '/D' for Inno Setup and NSIS installers...

Also FYI...

winnt.sif:

[Unattended]
ProgramFilesDir="foo:\bar"

Registry:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion]
"ProgramFilesDir"="foo:\\bar"

I guess also temporarilly by adding 'set programfiles=foo:\bar' before the app-installs in a NT command script...

Link to comment
Share on other sites

Okay, I was kinda hoping for a more simple solution like that, though prepared to do more if needed.

My next question is could I do something like this:

[Unattended]
ProgramFilesDir="C:\"

Then on a case by case basis specify:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion]
"ProgramFilesDir"="C:\Mozilla\Firefox"

Would that work or am I off base?

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