1

I have MSI installer project where postbuildevent == cscript "$(ProjectDir)EnableLaunchApplication.js" "$(BuiltOuputPath)"

1 Question that I've been struggling for hours - how do I prevent running this script on uninstall - i.e. run it ONLY on install?

user1283791
  • 269
  • 1
  • 4
  • 14
  • http://stackoverflow.com/questions/1668274/run-exe-after-msi-installation - this is what i am using now. But I see "Run application" checkbox on uninstall too. – user1283791 Oct 09 '12 at 09:21

2 Answers2

2

post build events don't run on install nor on uninstall. they run post build

Jader Dias
  • 162
  • 1
  • 9
1

Based on this thread, I modified/added these lines:

sql = "INSERT INTO `ControlEvent` (`Dialog_`, `Control_`, `Event`, `Argument`, `Condition`, `Ordering`) VALUES ('FinishedForm', 'CloseButton', 'DoAction', 'VSDCA_Launch', 'LAUNCHAPP=1 AND NOT REMOVE', '0')";

sql = "INSERT INTO `ControlCondition` (`Dialog_`, `Control_`, `Action`, `Condition`) VALUES ('FinishedForm', 'CheckboxLaunch', 'Hide', 'Installed')";
view = database.OpenView(sql);
view.Execute();
view.Close();
jhoanna
  • 1,797
  • 25
  • 25