PostBuildEvent Question

Posted on 2006-07-10
Medium Priority
Last Modified: 2007-12-19
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
Question by:kevsbox
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Accepted Solution

jrscherer earned 500 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

649 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