Run your application as administrator

Pluralsight courses
LinkedIn Premium uses PayScale to estimate job salaries

Premium (Not Free) Video Tutorials

Free Video Tutorials & Free Tools

At times. you may require your program to run as administrator

There are 2 ways to do this

1. Modify the project UAC settings

2. Go to debug and then run your program .exe file as administraotr

We will discuss both the methods let's start with the first method

Well for the first method you need to replace only 1 word .

See this video for the first method :

Here is the 1st method

"You need to make your application UAC compliant so that it will ask user to grant your application Administrator access".

to make your application UAC compliant,

Double Click My Project in Solution Explorer and Click UAC Settings button as shown in image.

Then Modify app.manifest file as shown below. Make it 'requireAdministrator' instead of 'asInvoker' and save.

Now let's discuss the second one

For that go to debug folder and then find your application .exe file and then right click on it and select properties option

Now when the dialog box appears.

Then go to compatiblity tab and cehck the option always run this prgram as administrator.

This does the same job.

Thanks !

Related posts:

  1. Build a bluetooth Chat Application Bluetooth is one of today's most exciting technologies. It...
  2. VB Soup to application, treeview, controls, example, print 17 FREE One-hour Videos from Microsoft Expert, Ron Cundiff, on...
  3. Make a chat application using Do you want to create a simple chat application using...
  4. Using Microsoft Web Developer to Build Web Application Projects – (16 Free Video Tutorials) Here is a table with links to 16 free video...
  5. What is SQL? What is SQL? SQL stands for Structured Query Language and...

Related posts brought to you by Yet Another Related Posts Plugin.


One Response to “Run your application as administrator”
  1. raju says:

    I used app.manifest file make it 'requireAdministrator' instead of 'asInvoker'.
    But my problem is when i run exe it appear UAC unknown publisher Yes, NO dialgobox every time.
    So, my question is how can i avoid UAC dialogbox.


Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

Powered by WP Hashcash

This blog uses the cross-linker plugin developed by Web-Developers.Net