Run your vb.net application as administrator

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 !