For me, this makes it a less than ideal solution. ShellExecute() doesn't have the fine control over process creation, like CreateProcess() does. So are there calls to deal with UAC, which are performed by ShellExecute(), and with the results CreateProcess is satisfied ![]() XxCreateProcess to work properly, and this is done in usermode. Ntdll.dll, but in both scenarios it does something to satisfy The parameters, that it works properly, because by the end it must comeĭown to CreateProcess(), because this is the function exported I stumbled accross the same problem, and I read in a other thread to use ShellExecute() instead of CreateProcess.ok.īut, what the hell does ShellExecute() to provide CreateProcess() with I would have expected it to create the process, but without elevation in this case. I guess my gripe is that if CreateProcess() doesn't support elevation, then it shouldn't block process creation either. I’m doing this from regular unmanaged C++. Proc.StartInfo = new ProcessStartInfo ( ) How about if a service needs to impersonate a user, but with elevated privileges enabled A code sample for this would be great.Īccording to the documentation on UAC (User Account Control) the CreateProcess command doesn't support elevation of privileges instead you should use (in managed code) something like: This makes things very difficult to code for - if my application is started directly by the user, via cmd.exe for example, I get the UAC dialog, but if it is started silently via CreateProcess(), it fails completely. Wouldn't it be better if the process creation succeeded, but as a limited user If I am logged on as a member of the administrator group, with UAC at the default setting, and call CreateProcess() on this executable, it fails with GetLastError()=740. ![]() On vista Beta 2, i have added a manifest to one of my executeables that specifies the "highestAvailable" application marking. Posted: Security for Applications in Windows Vista, CreateProcess() + "highestAvailable" = error 740 ![]() Index ‹ Software Development for Windows Vista ‹ Security for Applications in Windows Vista CreateProcess() + "highestAvailable" = error 740
0 Comments
Leave a Reply. |