Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 6

kernel32.CreateProcessA on Server 2008 x64 with elivated privileges

I am trying to use our function that is used to execute external applications such as cmd and some helper tools in a 64 bit environment. We seem to use shell32 to do this:

kernel32.CreateProcessA(NULL, szProgram + " " + szCmdLine, NULL, NULL, TRUE, 0, NULL, NULL, &siData, &piData)

This code works when you dont need your privileges to get elivated (tested this outside of the install), but unfortunately one of my cmd files needs elivated privileges...

I think the reasoning behind using this code was that the LAAW functions / EXE CA's dont work properly for us in IS11 (now upgraded to IS2009).

SO, my question is - How do I pass the runas command to force this call to run as administrator?
Labels (1)
0 Kudos
(1) Reply
Level 12 Flexeran
Level 12 Flexeran

In order to elevate, you need to offer UI, generally in the form of a call to ShellExecute / ShellExecuteEx. LaunchApplication can do this with the LAAW_OPTION_USE_SHELLEXECUTE flag.
0 Kudos