1

Hi all How do i run a EXE file straight after my MSI has executed and successfully installed. Have been looking the the postbuildevent with the MSI but it does't seem to work. Tried just putting in the full path and filemame, without much success

user497382
  • 31
  • 6

1 Answers1

1

Assuming that the exe is the primary output from one of the projects in your solution that is being built by the MSI, you should be able to do this in the Post Install Event by selecting the "Primary output" from that project. (Link coming with instructions if I can find it.)

Edit

I did find this previously asked question that gives a workaround for doing iut in the post-build event: VS .Net: Post build events for "Primary Output from <myProject>" in installer project

And I found the instructions I was looking for originally here: http://support.microsoft.com/kb/827018

Community
  • 1
  • 1
David
  • 72,686
  • 18
  • 132
  • 173
  • Thanks for the prompt reply. Did all the above (Create Custom Action) , and followed instructions from Microsoft as instructed. What do i have to add to the 'PostBuildEvent' property to get this to run. – user497382 Mar 29 '11 at 13:52
  • The primary output from the project that creates the executable IF the exe is being built in the same solution following the instructions in Add a Custom Action to Run the EXE File from teh KB. – David Mar 29 '11 at 14:04
  • If the executable is NOT being built as part of the solution, but is elsewhere on teh hard drive, then follow the first link and set the path to the executable in the batch file. – David Mar 29 '11 at 14:04
  • Ok. Just to clarify. The EXE is not part of the solution, so i need to call the EXE from within its own dedicated BATCH file, then just add the full path of the BATCH file in the PostBuildEvent. Is this correct? – user497382 Mar 29 '11 at 18:38