I need to set up a launch condition in my installer to prevent the user from running the MSI file directly unless they are running an uninstall. (All other types of install should be run from the bootstrap app so that it can make sure that all of the preconditions are met.)
What conditions to I need to check for this? I tried REMOVE="ALL" OR BOOTSTRAP
(BOOTSTRAP
is a property that my bootstrap app defines on the command line when it launches the MSI), but that also triggers on a Repair install, which 开发者_如何学CI don't want.
Personally I go about this a different way. I expect that a user might run the MSI and not the SETUP.EXE so I intentionally duplicate all of my bootstrapper prereq checks in the MSI using AppSearch and LaunchConditions. That way if they either skip the bootstrapper or it somehow fails my MSI can still catch the problem.
I also follow the practice of appending "or Installed" on my conditions so that a missing prereq won't hinder uninstalls.
As far as I can tell, so far, there doesn't seem to be a way to prevent Repair installs from being run when an MSI is launched directly, so I had to add OR REINSTALL="ALL"
to my launch condition. If someone knows of a way to allow Repairs to be done only via the bootstrapper, an explanation would be much appreciated.
精彩评论