Click here to Skip to main content
12,629,107 members (35,776 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# VB VB.NET
Hi Guys
i want to learn how to Run my application as administrator using VB.Net or C#
thanx for all.
Posted 9-Jan-13 22:27pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Embed an application manifest: MSDN[^]
  Permalink  
Comments
alcitect 13-Jan-13 1:33am
   
thanks for you useful answer
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

1. need to add an application manifest file
2. modify the application manifest file :
<requestedExecutionLevel  level="asInvoker" uiAccess="false" />
<requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel  level="highestAvailable" uiAccess="false" />
there has three level: default asInvoker;Running an application as administrator you need set the level as requireAdministrator
  Permalink  
Comments
alcitect 13-Jan-13 1:33am
   
thank you for useful answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.161205.3 | Last Updated 10 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100