Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleMark a program to run with elevated privileges by using its manifest in Visual Basic 2008
DescriptionThis example shows how to mark a program to run with elevated privileges by using its manifest in Visual Basic 2008.
KeywordsUAC, shield, Vista, user access control, elevated privileges
CategoriesWindows, 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.

 
 
Copyright © 1997-2006 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated