user1673665
user1673665

Reputation: 522

Application does not start after running setup with postbuild event

I've used the script from this thread: Run exe after msi installation? respectively this site: Mailbag: How can I customize an MSI in the Visual Studio setup/deployment project?

The checkbox on the finished dialog shows up but my application doesn't start after pressing finish. Nothing happens.

I've tried different lines:

sql = "INSERT INTO `CustomAction` (`Action`, `Type`, `Source`, `Target`) VALUES ('VSDCA_Launch', '210', '" + fileId + "', '')";

or

sql = "INSERT INTO `CustomAction` (`Action`, `Type`, `Source`, `Target`) VALUES ('VSDCA_Launch', '226', 'TARGETDIR', 'MyProgram.exe')";

Any ideas or is it possible to debug the script or write a log with further informations to find out what exactly doesn't work? The application need administrator rights. Does this matter?

Upvotes: 1

Views: 157

Answers (1)

Stein Åsmul
Stein Åsmul

Reputation: 42176

Formatted: The fact that notepad.exe works probably means that you need a full path (notepad.exe is in the system path and can hence be invoked without a path, other binaries need full path).

Did you try to do [#filekey] as in [#MyProgram.exe] as value in the Target field? The reference must match a File table entry. So look in the first column of the File table to determine what the file identifier is, and use that in the Target field.

Check out the documentation for Formatted.

WiX?: By the way, is it an option to migrate to WiX? Not to annoy you, but there are some major problems with Visual Studio Projects for long term use. Maybe give it a quick skim.

File Table:

File Table

Shortcut Table:

Shortcut Table


Leaving original answer below:


Quick Test: Maybe first check this: What VSDCA_Launch mean in Custom Action script


Logging: Have you enabled logging to determine what is going on? Please check the Logging section in this answer for a quick "how to".

Dry Run: I suppose you could slipstream notepad.exe in there instead of your own executable to see if it launches OK when admin rights are not required. All you need is a test build and a test run.

Incomplete: I am betting you have forgotten something when post processing the MSI though. My guess is a simple formatting issues such as described by the post linked above.

Upvotes: 1

Related Questions