How to run a Visual Studio project as administrator for a single project
[FONT=arial narrow][SIZE=4][B]1)[/B][/SIZE][/FONT]
In your project while its open;
Create a manifest file:
right click on the project and select “Add New Item”, select “Application Manifest File”. This will add a file named app.manifest to the project.
Edit manifest file:
set attribute level for tag requestedExecutionLevel to requireAdministrator.
[B][FONT=arial narrow][SIZE=4]2)[/SIZE][/FONT][/B]
Find”
[CODE][/CODE]
[B][FONT=arial narrow][SIZE=4]3)[/SIZE][/FONT][/B]
Change to:
[CODE][/CODE]
[SIZE=4][FONT=arial narrow][B]4)[/B][/FONT][/SIZE]
Next go to your project settings: Debug/Enable Debuggers/ and [B]uncheck[/B]: (Enable the Visual Studio hosting process)
Save all and build/rebuild your project then it will work.