Click to See Complete Forum and Search --> : Running thread with different permissions


a6amsunrise
May 25th, 2006, 09:07 AM
Running XP, i dont log in as admin all the time, but one program i wrote needs to have admin permsission. Normally i use the
RUNAS /USER:a6amsunrise C:\pyprogram.exe
command, but is there some win api function that will just escalate privileges by itself? Like a runas(functionname/thread, username, password)?

philkr
May 25th, 2006, 11:43 AM
Yes, take a look here: Client Impersonation (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/client_impersonation.asp)

a6amsunrise
May 25th, 2006, 01:06 PM
Thanks, that wasnt exactly what i was looking for, but it led me to this:
CreateProcessAsUser (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/starting_an_interactive_client_process_in_c__.asp)