|
|
Title | Mark a program to run with elevated privileges by using its manifest in Visual Basic 2008 |
Description | This example shows how to mark a program to run with elevated privileges by using its manifest in Visual Basic 2008. |
Keywords | UAC, shield, Vista, user access control, elevated privileges |
Categories | Windows, Software Engineering |
|
|
One way to run a program with elevated privileges is to mark its manifest so it requires those privileges.
Double-click My Project to open the project's property pages. On the Application tab, click the View UAC Settings button. Change the requestedExecutionLevel element's level attribute to requireAdministrator. Now compile the program as usual.
The program will run normally in the Visual Studio IDE but when you run the compile executable the UAC privilege elevation dialog will appear automatically.
|
|
|
|
|
|