Installation Directory Question

  • Thread starter Thread starter Wardell Castles
  • Start date Start date
W

Wardell Castles

Is there a way to prevent the user from changing the installation
directory?

If the installation directory is changed, is there a way to find out
what it was changed to?

TIA,
Wardell Castles
 
Eliminate the dialog that gives them a choice, if you're building your own
MSI file. In general you can find out programmatically where something was
installed. If you built the MSI file you can save the primary install
location, but if you know an installer component Guid (they're in the MSI
file) you can find out where it was installed to.
 
Adding to what Phil said...

Keep in mind that the user can still specify the install location on the
command line by setting the TARGETDIR property. For example:
msiexec /i mymsi.msi TARGETDIR="C:\MyDir"

If you really, really want to avoid the user changing it, don't base your
installation off of TARGETDIR. Use Mixed case directory keys (thus making
them unchangeable from outside the installation) and build it off of a known
location like ProgramFilesFolder.

--
****************************************
Michael Sanford
Windows Installer MVP
****************************************
Phil Wilson said:
Eliminate the dialog that gives them a choice, if you're building your own
MSI file. In general you can find out programmatically where something was
installed. If you built the MSI file you can save the primary install
location, but if you know an installer component Guid (they're in the MSI
file) you can find out where it was installed to.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

Wardell Castles said:
Is there a way to prevent the user from changing the installation
directory?

If the installation directory is changed, is there a way to find out
what it was changed to?

TIA,
Wardell Castles
 
Back
Top