PostBuildEvent Question

Posted on 2006-07-10
Last Modified: 2007-12-19
I am want my 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
Question by:kevsbox
  • 3
  • 2

Author Comment

ID: 17076502
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?
LVL 11

Expert Comment

ID: 17076612
why don't you use the SHELL command in your exe file, to run your post installation commands, and forget the PostBuildEvent box?

Author Comment

ID: 17076906
Because I am trying to get the exe to run after the msi completed, hence trying to use  PostBuildEvent.
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center


Accepted Solution

jrscherer earned 125 total points
ID: 17078788
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
LVL 11

Expert Comment

ID: 17080929
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:

Author Comment

ID: 17081230
Thanks guys

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below.…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question