Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Run program as administrator...

Run program as administrator...

Run program as administrator...

Hello again!

One of my programs require administrator privileges in order to look some information from the registry. Is there any way to force the UAC dialog in Windows Vista and 7 at startup so the program would get administrative rights? Normally the program starts without asking for permissions and I can't access the registry.


RE: Run program as administrator...

You could provide a 'manifest' file, within which you could define that the associated executable requires administrative privileges.

Not sure whether or not this would automatically bring up the UAC dialogue though.

RE: Run program as administrator...

The problem is that MSDN offerd examples only for Visual C++... I can't find any embed manifest option in Borland.

RE: Run program as administrator...

You can just create a manifest file using NotePad - it's only a text file containing XML.

The name of the manifest file has to be based on the name of your executable file (I can't remember the required naming standard, sorry) and it should be placed in the same folder as the executable file.

The important content (for your purposes) is to include the required 'level' value in the 'requestedExecutionLevel' element.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close