cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MRKiscaden
Level 5

Vista and .msi files.

I have a basic MSI project, and the end product is distributed as a .msi file. In that project I have a Custom Action that executes the LaunchAppAndWait() function. However in Vista this function fails due to access privileges unless I launch the .msi via a command prompt opened as administrator and calling msiexec.

The documentation points to setting the "Required Execution Level" to Administrator in the Release configuration, but since I am distributing an .msi instead of a setup.exe, this does not apply.

Is there some configuration of LaunchAppAndWait() that I can use to have the UAC prompt that is fired when the installer starts carry over to the CustomAction? I have tried it both with and without the LAAW_OPTION_USE_SHELLEXECUTE to no avail, but I have not tried any other configuration options.
Labels (1)
0 Kudos
(7) Replies
RobertDickau
Flexera Alumni

Where in the sequences are you running the custom action? What are its settings (immediate vs. deferred, and all that)?

If you haven't, you might also see this fine newsletter tip from Stefan Krueger: http://www.acresso.com/webdocuments/PDF/is_vista.pdf.
0 Kudos
DebbieL
Level 17

In InstallShield 2008, the LaunchApplication function was introduced. It basically replaces the LaunchAppAndWait function.

If you are using LAAW_OPTION_USE_SHELLEXECUTE on Windows Vista and you want to run the application using the full administrator account (similar to right-clicking the executable file and selecting Run As Administrator), try setting the LAAW_SHELLEXECUTEVERB to runas before using LaunchApplication in your script:
LAAW_SHELLEXECUTEVERB = "runas";

For more information on LaunchApplication, see the help.

I hope that helps.

Debbie Landers
Acresso Software
0 Kudos
MRKiscaden
Level 5

Switching to LaunchApplication and using LAAW_SHELLEXECUTEVERB = "runas" did the trick. Thanks for the help.
0 Kudos
BrHartmann
Level 7

We're encountering the same problem with basic MSI custom actions in Vista. We are close to upgrading to Installshield 2009, but need to release one more version of our product with Installshield 12 beforehand. I was wondering if there was a way to achieve similar functionality with IS 12? I tried setting LAAW_SHELLEXECUTEVERB, but this isn't even recognized as a keyword in IS 12.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

I believe there is code available on InstallSite.org which shows how to call ShellExecute from InstallScript.
0 Kudos
BrHartmann
Level 7

Michael -- the closest thing I found on Installsite.org was "Extended Version of LaunchAppAndWait", but it appears that this functions still uses CreateProcess at it's core, not ShellExecute, and thus would still not get us past the UAC problem in Vista.

If you (or anyone else) have a direct link to some sample code using ShellExecute that would work in Installshield 12, it would be much appreciated.

Thanks.
0 Kudos
RobertDickau
Flexera Alumni

Actually, searching these forums for "ShellExecute" turns up a couple dozen posts, so that might be worthwhile. Searching the KB turns up quite a few, too.
0 Kudos