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.
ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!


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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

770 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