I have a console application that was developed to be called by a erp software.
They call my app inside the erp and when they do it, i always get errors related to the insufficient permission to do it.
I have checked the "run this program as an administrator" checkbox in the properties of the exe for all users but the result is the same.
I have read something about adding a manifest that will make the app prompt for the uac dialog, but thats not what i want because the app will be called from erp on the server and clients will not see the dialog on server.
Can someone explain me how to make this console app always run as administrator?
Add into your project Application Manifest File (Add -> New Item -> General -> Application Manifest File) and add the below node into the app.manifest:
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
http://msdn.microsoft.com/en-us/library/windows/desktop/bb756929.aspx