Prev Previous Post   Next Post Next

How do I explicitly cause a UAC elevation prompt?

Posted: 09-05-2006, 10:16 PM
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.
Reply With Quote

Responses to "How do I explicitly cause a UAC elevation prompt?"

 
LinkBack Thread Tools Display Modes
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may 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 On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why prompt for my own password? JimR Windows Vista Security 8 09-14-2006 11:37 PM
5536: Run CMD prompt as admin issue Paul Russell Windows Vista Security 3 09-03-2006 06:48 PM
how to get orignal token after Elevation? dispaly name Windows Vista Security 2 07-26-2006 02:09 AM
Ah, the DOS Prompt Tom Scales Windows Vista File Management 2 07-06-2006 08:55 PM
Dealing with UAP within the command prompt Mike Herchel Windows Vista Administration 3 07-04-2006 01:24 AM