This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- launch exe after install with admin privileges
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Aug 15, 2011
04:03 PM
launch exe after install with admin privileges
I would like to be able to launch an installed executable after installation is complete. I've tried to use IS_LAUNCH_MY_PROGRAM_PLEASE as a custom action when the finish button is pressed in the SetupCompleteSuccess dialog, but it doesn't work. I get error 1721: There is a problem with the Windows Intsaller package, etc. This link explains my situation fairly closely:
http://www.tipandtrick.net/2008/error-1721-there-is-a-problem-with-this-windows-installer-package-when-install-or-uninstall-on-vista/
Basically, my installed exe must be run as an administrator, which the custom action does not provide. I know that you can run an exe from within the installer with elevated privileges using deferred execution in system context. However, this will not work in my case because the SetupCompleteSuccess dialog occurs after the InstallFinalize action. If I change the manifest for my exe to have "AsInvoker" privileges it runs after the dialog, but crashes soon after because it needs write access within the ProgramFiles folder(I cannot change its need for write access). Is there any other way to get my exe to be run as administrator the way that I'd like to?
http://www.tipandtrick.net/2008/error-1721-there-is-a-problem-with-this-windows-installer-package-when-install-or-uninstall-on-vista/
Basically, my installed exe must be run as an administrator, which the custom action does not provide. I know that you can run an exe from within the installer with elevated privileges using deferred execution in system context. However, this will not work in my case because the SetupCompleteSuccess dialog occurs after the InstallFinalize action. If I change the manifest for my exe to have "AsInvoker" privileges it runs after the dialog, but crashes soon after because it needs write access within the ProgramFiles folder(I cannot change its need for write access). Is there any other way to get my exe to be run as administrator the way that I'd like to?
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Aug 17, 2011
01:49 AM
Hi There,
You could wrap the execution of the custom action in script code to call it via ShellExecute() -- this would trigger another UAC prompt.
That's the only clean solution, anyways. If you're curious about this, my recommendation is to use InstallScript's LaunchApplication function with the LAAW_USE_SHELLEXECUTE flag passed in as an option flag.
You could wrap the execution of the custom action in script code to call it via ShellExecute() -- this would trigger another UAC prompt.
That's the only clean solution, anyways. If you're curious about this, my recommendation is to use InstallScript's LaunchApplication function with the LAAW_USE_SHELLEXECUTE flag passed in as an option flag.