Hi all,
I have build a Windows Installer using Orca and need to call an installed executable from the installer at the end of a successful installation. The installed exe has a manifest which requires admin privileges. I do call the exe from a control event like this in the ControlEvent table:
ExitDialog, Finish, DoAction, StartActivationCA, NOT Installed, 2
At installation the exe is not called and the log files show the following:
Action 09:21:25: StartActivationCA.
Action start 09:21:25: StartActivationCA.
Action ended 09:21:25: ExitDialog. Return value 1.
Action ended 09:21:25: INSTALL. Return value 1.
Action ended 09:21:25: StartActivationCA. Return value 1631.
The error 1631 seems to be due to the required admin privileges because the custom action is not deferred and the installer is not elevated at that time. It would be fine if a UAC prompt is shown for starting the exe but it is not. It is necessary that the exe is started after completion of the actual installation because the user has to enter customer information etc.
Any ideas how to do this?
thanks in advance,
Nicolas
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Custom action to start elevated exe
Started by
nicolasr
, Jan 23 2012 12:26
2 replies to this topic
Posted 26 January 2012 - 15:20
I think somewhere on the web I've seen an articvle how to launch an elevated application from a non-elevated.
Or could you launch the exe from a deferred mode custom action near the end of the install, before the finish dialog is displayed?
Or could you launch the exe from a deferred mode custom action near the end of the install, before the finish dialog is displayed?
Stefan Krüger
InstallSite.org twitter facebook
Posted 27 January 2012 - 00:30
Thanks Stefan.
I thought about starting the exe from a deferred mode custom action but that would probably bring up the window before the windows installer dialogs are closed which may seem a bit strange to the customer.
I found another solution, though: I wrote a command line exe that does not require admin rights and does nothing else than ShellExecute the actual exe.
Since the command line program does not require admin rights it can be started from the installer without error and calling ShellExecute from this program then brings up the UAC prompt as desired.
Nicolas
I thought about starting the exe from a deferred mode custom action but that would probably bring up the window before the windows installer dialogs are closed which may seem a bit strange to the customer.
I found another solution, though: I wrote a command line exe that does not require admin rights and does nothing else than ShellExecute the actual exe.
Since the command line program does not require admin rights it can be started from the installer without error and calling ShellExecute from this program then brings up the UAC prompt as desired.
Nicolas