[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1706
  • Last Modified:

PostBuildEvent Question

Hi
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
0
kevsbox
Asked:
kevsbox
  • 3
  • 2
1 Solution
 
kevsboxAuthor Commented:
if it helps I have added this to the PostBuildEvent box -
$(TargetDir)\setup2.exe

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?
0
 
MacNuttinCommented:
why don't you use the SHELL command in your exe file, to run your post installation commands, and forget the PostBuildEvent box?
Just use : SHELL "YOUR .EXE COMMAND PATH"
0
 
kevsboxAuthor Commented:
Because I am trying to get the exe to run after the msi completed, hence trying to use  PostBuildEvent.
0
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!

 
jrschererCommented:
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
http://www.c-sharpcorner.com/UploadFile/vishnuprasad2005/SetupProjects12022005022406AM/SetupProjects.aspx?ArticleID=0488bf0b-7cf6-4e31-a9b5-38aa4ae8cd47
Jack.net
0
 
MacNuttinCommented:
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:
http://msdn2.microsoft.com/en-us/library/6h314436.aspx
0
 
kevsboxAuthor Commented:
Thanks guys
0

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.

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