cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sammathew
Level 4

Prompt UAC after OnFirstUIBefore

Hello All,

I am Using InstallScript Project(InstallShield 2008).

Our Product requires Administrative privileges in order to put the registry entries and allso to register the COM dll's.All these have been handled in OnFirstUIAfter.

Is there a way to Prompt the UAC after OnFirstUIBefore because we dont want to prompt UAC to the user in OnFirstUIBefore.

I had tried all the three options in the Required Execution Level but still none as given me the result that i expect.

I know that when we create the build the manifest is embedded as a resource in Setup.exe.Is there a way to change the resource file at the run time if so how to do that.

Or is there any other way that it can be achieved.

My Advance thanks.
Labels (1)
0 Kudos
(2) Replies
Holger_G
Level 10

Your installation requires administrative privileges during a first time installation (especially during OnFirstUIAfter event). But you want to raise the UAC prompt firstly after OnFirstUIAfter and for a first time installation only?
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

InstallScript itself doesn't support this kind of elevation natively. However you might be able to simulate it by using a ShellExecute with verb "runas" to launch the setup from a wrapper setup. If you're really tricky, you can probably make these both with the same setup, but in the wrapper non-admin mode it would have to avoid installing things. I forget when we introduced the LaunchApplication API (either IS2008 or IS2009), which supports using ShellExecute; if it's available, use it; if not, there are samples around showing how to get to ShellExecute directly.
0 Kudos