Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista security

Vista - How do I explicitly cause a UAC elevation prompt?

Reply
 
Old 09-05-2006   #1 (permalink)
=?Utf-8?B?S2V2aW4gU291dGhlcm4=?=


 
 

How do I explicitly cause a UAC elevation prompt?

I am writing an application that needs to run from a CD without undergoing an
installation of any software to the user's system. I need administrative
rights to the machine, since I will need to install drivers as part of my
operation. However, I have the following constraints:

1) I do not want to assemble and maintain an MSI installer.
2) I need to run on an "out of the box" WinXP-SP2 & Win2k, so cannot use .NET

As of now, the following are the only ways to trigger an elevation prompt
that I'm aware of. I've listed why I don't believe it will work for me:

1) Move privileged code into a COM object and use CoCreateInstanceAsAdmin
The problem with this approach is that I cannot register the object
without writing and running a separate MSI package. I really would prefer to
avoid having to write or maintain that.

2) Change the name of the application to include the word SETUP or INSTALL
First, this will make the name of my application strange. More
importantly, I don't want to be subject to Microsoft changing the rules
regarding recognition of an application containing the name SETUP or INSTALL.

3) Add information to the application manifest to indicate that
administrative privileges are required.
As mentioned above, I cannot be dependent on .NET.

Does anyone know how to deterministically cause the elevation prompt to
appear? Thanks in advance for any help that anyone can provide.

My System SpecsSystem Spec
Old 09-05-2006   #2 (permalink)
Jimmy Brush


 
 

Re: How do I explicitly cause a UAC elevation prompt?

Hello,

The manifest file does not create a dependency on .NET - this is just a
Win32 resource file that is embedded into your exe.

http://msdn.microsoft.com/windowsvis...cProtVista.asp


--
- JB

Windows Vista Support Faq
http://www.jimmah.com/vista/

My System SpecsSystem Spec
Old 09-07-2006   #3 (permalink)
=?Utf-8?B?S2V2aW4gU291dGhlcm4=?=


 
 

Re: How do I explicitly cause a UAC elevation prompt?

Fantastic! I'll give this a try. Thanks for the response.

"Jimmy Brush" wrote:

> The manifest file does not create a dependency on .NET - this is just a
> Win32 resource file that is embedded into your exe.


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
How to prompt for elevation for a single operation? .NET General
Remote Control Standard User Account - Elevation Prompt issues Vista security
Can't Install Due to Elevation (Requires Elevation) Vista installation & setup
UAC Elevation Prompt Problem System Security
Behaviour of elevation prompt for Standard Users On All Vista Edit Vista account administration


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

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