I tried to do some Win32 stuff in C # 3.5 to get elevated user rights for a console application. I am developing Visual Studio 2008 SP1 / GDR and everything works fine when it starts under the debugger. Everything works fine when I run the console application autonomously. Everything works fine when I pack everything in MSI and install it on the 2003 server and run the console application.
If I take the same MSI and install it on the 2008 server with UAC enabled, and then run the console application, I get the following messages:
Unable to set right for the account "DOMAIN\QAUSER": SeCreateGlobalPrivilege
System.UnauthorizedAccessException Attempted to perform an unauthorized operation.
I cannot expect my deployment / server administrators to do anything with my application other than installation, and they will not disable UAC. There must be some programmatic way to correctly set the user rights that I can add to the console application - does anyone know how?
Thank.
source
share