Click here to Skip to main content
11,434,743 members (42,284 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# 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 at 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 at 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)



Advertise | Privacy | Mobile
Web04 | 2.8.150428.2 | Last Updated 10 Jan 2013
Copyright © CodeProject, 1999-2015
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