run program as administrator

hey

how would i run a program from c++ code as administrator.

i have tried
system("C:\Program Files\Internet Explorer\iexplore.exe");

the code looks like this in visual basic
Shell (""C:\Program Files\Internet Explorer\iexplore.exe" -u administrator -p password -i "")

thanks in advance, zac
Last edited on
Did you check CreateProcess()'s documentation? Not really sure if it has some way to run a process as a different user, but it's worth checking it out.
http://msdn.microsoft.com/en-us/library/ms682425.aspx
It has nothing to do with CreateProcess()
See news://comp.os.ms-windows.programmer.win32
where it's a FAQ...
Topic archived. No new replies allowed.