Hello, I know that it can be set from the msi file or mst a property for INSTALLDIR that does not permit at install to change the installdir from command line. Does anyone know about it?
Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0
Are you asking if there is a way to KEEP"INSTALLDIR=c:\whatever" from being set and applying from a Command Line, and overwriting anything that you put in your MST?

If so, I have seen some vendors that set a property with a custom action that happens toward the end of the InstallExecuteSequence and replacing / over writing any properties added via MST. I got around this by putting a condition on the Custom Action that was looking for a Higher than set INSTALLLEVEL (a good amount of vendors set INSTALLLEVEL to 100, then I would put a condition of INSTALLLEVEL = 200 on that Custom Action so that it would never run.
Answered 09/04/2014 by: ekgcorp
Tenth Degree Black Belt

  • I heard about a property that when it is set in the msi the user/admin could not change the installdir from command line. Are you saying that "property" is a custom action? I don't know for sure what is it but I know that you can set an installdir for the msi and when someone try to install the msi msiexec /i x.msi INSTALLDIR="C:\blabla" the installation could not be made
Please log in to comment
0

You can only change it if it exists. If you want to install your app somewhere else, and the INSTALLDIR property 'is not working' then the MSI might not be using INSTALLDIR. (check the Directory table for INSTALLLOCATION, APPDIR, also, others are available)

I have also seen with a few vendor MSI's that a CustomAction sets the install location (INSTALLDIR or other) , so you set it to what you want, and then the CA overwrites your change. grrrr

OR, the CA only runs during InstallUI sequence, so you install it silently and the app installs to the root of the C:\. double grrrr.

Answered 09/05/2014 by: Badger
Red Belt

  • I will try to make a CA for this. Thank you all for answering
    • hold the phone.... really a CA???
      • I will try that but.......but my question was how to prevent at a installation of an msi to change the INSTALLDIR from command line :)
    • I think what Badger and I are trying to say is, be aware of what the vendor might be trying to do via CA. Creating one is more of a last resort. I would be more inclined to keep vendors CA from running that was changing the INSTALLDIR, then to create yet another CA to compensate what they are trying to do.
      • yep.... you might need to re read your question.... If setting INSTALLDIR is not working, find out WHY, don't just write a CA.
      • so, the question is, how can you prevent the INSTALLDIR from being changed via the command line, you cant. since its in CAPITALS that means it is a public property, the significance of these is, they CAN be changed from the command line. you could change the MSI so that the INSTALLDIR was private not public. so maybe MyInstalldir. Then that would not be changeable from the command line, but it would still be able to be changed using the GUI (if the dialogue boxes have been created) or via an MST.
Please log in to comment
0
"Answered"!
Answered 09/05/2014 by: EmanuelPopescu
Yellow Belt

  • Thank you Badger, I understand better how INSTALLDIR prop works. Thank you for your answer:)
Please log in to comment
Answer this question or Comment on this question for clarity