I have a Visual Studio setup with a custom action written in C++. I need to launch a process from a custom action but both Install and Commit actions are run elevated and thus my process runs elevated too. I want the new process to run as a regular user.
I have seen Start exe after msi install but using current user privileges but it seems overly complicated and shows no code. I haven’t got the time to experiment with an unknown API.
Are there any easy ways? Can I use VS Setup to define a non-elevated custom action or do something from the elevated custom action?
Visual Studio setup projects do not support immediate custom actions. They are all deferred by default.
So either you use custom code to impersonate the current user or you switch to another setup authoring tool which supports immediate actions.