Installing to a Drive Other Than C:
Updated: 14 May 2008 | 2 comments
If you have to install applications to any other Physical Drive (not network drive) you can do so in the following way.
default INSTALLDIR : C:\Program Files\Dir1 Change to D:\Program Files\Dir1
- In the MSI Script create a custom action In "User Interface" just after "Cost Finalize"
"Set Directory" give it a Name, choose the directory by browsing to ProgramFilesFolder\Dir1 and in the third Blank Space enter "D:\Program Files\Dir1"
- Create the same Custom action in "Execute Immediate" just after "Cost Finalize" also
This installation works fine as long as D: is a valid Drive, it does not work on drives that were created using "Subst.exe" Command.
blog entry Filed Under:
The Endpoint Management Community Blog is the perfect place to share short, timely insights including product tips, news and other information relevant to the Endpoint Management community. Any authenticated Connect member can contribute to this blog.
Comments
There is also a ROOTDRIVE property
While this is an interesting approach, you should also consider using the Windows Installer ROOTDRIVE property. This can be overridden at the command line so it might be a bit easier to implement long term.
INSTALLDIR from command prompt
While installation you can change the Install directory. As INSTALLDIR is public property you can set it on command line, example
msiexec /i "path of MSINAME" INSTALLDIR="Directory Path"
This way you can install application in any drive & folder .
Following things need to be considered.
There should not be any hardcoding in any file or registry. If there is any hardcoding then it need to be resolve.
if "[ProgramFilesFolder]\ABC" is your InstallDir then wherver you find "[ProgramFilesFolder]\ABC" it should be replace with [INSTALLDIR] at every instance. Like in registry,ini file.
If there are any hardcode entry in uneditable file using wise (example config.xyz ) then it should be resolve by scripts.
And if any file is in cryptic format. i.e not uneditable at all then it is recommended not to change INSTALLDIR.
TARGETDIR also plays important role while, changing installdir. always recommended to check aliasing for it.
Regards
Harsh
Would you like to reply?
Login or Register to post your comment.