Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Security > Why don't MSI Installers Run in Elevated Context??? (And other deployment related questions)

Reply
Thread Tools Display Modes

Why don't MSI Installers Run in Elevated Context??? (And other deployment related questions)

 
 
Joseph Geretz
Guest
Posts: n/a

 
      02-28-2007
Here's the situation.

I have an installer which needs to install and register an ActiveX EXE as
part of my product.

(Yeah, it's me again. :-\ I'm getting awfully tired of this myself.)

In order to do this, the executable needs to be launched with elevated
permissions.

Fact 1. The name of my MSI is MyAppSetup.MSI. (It contains the magic term
'Setup'.)

Q1. Does the MSI run in elevated context? The indication that it does is
that I do get the elevation prompt when the MSI is launched. Indications
that it does not run elevated are a, there is no 'shield' incorporated to
the icon and b, see Fact 2. So I'm really not sure about this. Does the MSI
run in elevated context? Can someone answer this question, please?

Fact 2. Whatever the answer to Q1, the ActiveX executable launched as a
custom action from within the MSI does NOT get elevated and consequently
fails with 'Unanticipated error', since it can't get access to the Registry
which it needs in order to register itself.

Q2. IF the answer to Q1 is YES, then why doesn't the ActiveX application
launch as elevated? Can someone answer this question please?

Fact 3. If I compile my installer to EXE, as opposed to MSI then the
installer runs elevated (as proof, the icon displays the little shield icon
in the corner) AND the ActiveX executable properly launches elevated and
registers itself properly during the installation.

Q3. If an EXE can do this, why can't an MSI?

Q4. How is an MSI supposed to be deployed via Active Directory Group Policy?
Will it be able to run elevated under this condition? Will executables
launched from the MSI be able to run elevated under this condition?

Q5. Am I going to need to generate 2 installers for every software release;
an MSI for Group Policy install and an EXE for interactive workstation
install?

Just a few questions. Anyone wishing to install software for Vista is going
to need to know the answers to these questions.

Thanks for your help!

- Joseph Geretz -


 
Reply With Quote
 
 
 
 
Jesper
Guest
Posts: n/a

 
      02-28-2007
I'm no expert on installers, but there are a couple of resources out there
that may help:
http://blogs.msdn.com/windows_installer_team/ - Particularly the link to
Stefan Krueger's article sounds interesting.

The custom action is tricky, but Heath Stewart has a bunch of information on
it here
http://blogs.msdn.com/heaths/archive...-in-Vista.aspx


"Joseph Geretz" wrote:

> Here's the situation.
>
> I have an installer which needs to install and register an ActiveX EXE as
> part of my product.
>
> (Yeah, it's me again. :-\ I'm getting awfully tired of this myself.)
>
> In order to do this, the executable needs to be launched with elevated
> permissions.
>
> Fact 1. The name of my MSI is MyAppSetup.MSI. (It contains the magic term
> 'Setup'.)
>
> Q1. Does the MSI run in elevated context? The indication that it does is
> that I do get the elevation prompt when the MSI is launched. Indications
> that it does not run elevated are a, there is no 'shield' incorporated to
> the icon and b, see Fact 2. So I'm really not sure about this. Does the MSI
> run in elevated context? Can someone answer this question, please?
>
> Fact 2. Whatever the answer to Q1, the ActiveX executable launched as a
> custom action from within the MSI does NOT get elevated and consequently
> fails with 'Unanticipated error', since it can't get access to the Registry
> which it needs in order to register itself.
>
> Q2. IF the answer to Q1 is YES, then why doesn't the ActiveX application
> launch as elevated? Can someone answer this question please?
>
> Fact 3. If I compile my installer to EXE, as opposed to MSI then the
> installer runs elevated (as proof, the icon displays the little shield icon
> in the corner) AND the ActiveX executable properly launches elevated and
> registers itself properly during the installation.
>
> Q3. If an EXE can do this, why can't an MSI?
>
> Q4. How is an MSI supposed to be deployed via Active Directory Group Policy?
> Will it be able to run elevated under this condition? Will executables
> launched from the MSI be able to run elevated under this condition?
>
> Q5. Am I going to need to generate 2 installers for every software release;
> an MSI for Group Policy install and an EXE for interactive workstation
> install?
>
> Just a few questions. Anyone wishing to install software for Vista is going
> to need to know the answers to these questions.
>
> Thanks for your help!
>
> - Joseph Geretz -
>
>
>

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Micrsoft Deployment and Vista image deployment.... jaredwetmore Windows Vista Installation 1 12-19-2007 02:10 PM
Unzipping Compressed Installers John Windows Vista General Discussion 0 05-16-2007 10:02 PM
Why don't MSI Installers Run in Elevated Context??? (And other deployment related questions) Joseph Geretz Windows Vista Installation 1 02-28-2007 10:45 PM
Why don't MSI Installers Run in Elevated Context??? (And other deployment related questions) Joseph Geretz Windows Vista General Discussion 1 02-28-2007 10:45 PM
UAC and installers Corey Hildebrandt Windows Vista Security 3 02-15-2007 10:59 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59