• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1714
  • Last Modified:

PostBuildEvent Question

I am want my vb.net installation msi to run a exe after it has completed.
The exe in question will have been installed into whatever folder was chosen
during the install
So what do I put in the PostBuildEvent option eg [APPDIR]/setup.exe

Thanks in advance
  • 3
  • 2
1 Solution
kevsboxAuthor Commented:
if it helps I have added this to the PostBuildEvent box -

This causes the following error
Error 1 'PostBuildEvent' failed with error code '1' 'Unspecified error' D:\Inetpub\wwwroot\MTSetup\mtMSI\mtSetup\mtSetup.v dproj mtSetup

So the question is when the user selects a destination folder this is stored in a variable, so how do I reference that variable in PostBuildEvent
Surely someone can answer this?
why don't you use the SHELL command in your exe file, to run your post installation commands, and forget the PostBuildEvent box?
kevsboxAuthor Commented:
Because I am trying to get the exe to run after the msi completed, hence trying to use  PostBuildEvent.
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

I feel you are on the wrong track! The post build event is part of the visual studio and not part of the installer.
A PostBuild event can be used to eg run an obfuscator or whatever after the app is built, not after the MSI is installed.

The Windows installer file has its own "postbuilt" event, called CustomAction. When you create a Setup project, you can open the CustomAction editor and hook *.exe executables (or other, such as *.bat, *.wsh) to the four events Install, Commit, Rollback and Uninstall. Of cours, the .exe has to be part of the code you deploy to be present at execution time. There are ways to pass arguments from the installation process to the custom action. See
I agree with jrscherer another track other than the PostBuildEvent has always worked with setup's that have to install apps in order. But if you need more on PostBuildEvent Property there's a little here:
kevsboxAuthor Commented:
Thanks guys
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now