LKBEN11668: How to add a custom action for a visual studio setup project to run an exe.
Symptom
You would like to add a custom action on install, uninstall or both.
Cause
A possible use is to add the program path to the system variable so it can be run from the command line.
Solution
In the Setup Project click on "Custom Action" -> install -> select the exe file you would like to run (this has to be added to your setup project first).
Do not forget to set the installer class to false. Add the parameters for the exe file you would like to run. e.g.
PathEd.exe add "c:\program files\yourdirectory.
In this case only the parameter should only be
add "c:\program files\yourdirectory.
Test your MSI and have fun.
Disclaimer:
The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!About the Author
Author:
- Keskon GmbH & Co. KGWim Peeters is electronics engineer with an additional master in IT and over 30 years of experience, including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform.
Latest update: 26/05/2023