c++ - Run process as Local System -


i have regular program running administrator process. doesn't quite have privileges need. how elevate process run local system account ?

i don't want use externals tools achieve elevation. ideal if call win32 functions achieve it. willing write , run windows service in order pass privileges onto process in question.

someone please give me clue. searches sending me round , round in circles.

  1. program sends session id service
  2. service calls openprocesstoken , duplicatetokenex create local system token
  3. service calls settokeninformation change token session id match program's
  4. service calls duplicatehandle create handle token
  5. service sends handle program
  6. program calls setthreadtoken using received handle

the program have @ least 1 thread local system privileges. adequate purpose.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -