Installation Directory Question

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
 
P

Phil Wilson

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

Michael Sanford [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top