cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ljchipman
Level 3

Custom Action without One-Click???

Hi all,
I have a Custom Action to launch an executable that installs and starts up a service. It works great if I generate a One-Click Install, but if I choose not to, I get Error 1721 when I run the installation - it cannot launch the executable in the custom action. What am I doing wrong? I don't want a One-Click Install, I want a setup.exe. Thanks--
Labels (1)
0 Kudos
(2) Replies
ljchipman
Level 3

For anyone hunting for the answer, turns out you have to run the setup.exe as admin in order to launch an executable inside it (at least on Vista, if not other OSs). For some reason, the One-Click does not require admin.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

That sounds like a UAC issue. If you're launching from a low privilege process, and you use something which comes down to the Windows CreateProcess call, and what you launch requires administrative privileges, it will fail. Windows Installer EXE custom actions use CreateProcess. You can code around this by using something which comes down to a ShellExecute call (InstallScript's LaunchApplication has an option which uses this), or if appropriate, by launching from a point you have administrative privileges already. Or if you control the item you're launching and it truly doesn't require administrative privileges, you can make sure its manifest indicates this.
0 Kudos