Python subprocess.Popen as different user on Windows

前端 未结 3 1864
死守一世寂寞
死守一世寂寞 2020-12-03 18:27

What is the best manner of launching a subprocess as a different user in Python on Windows? Preferably XP and up, but if it works only on Vista and 7, I can live with that t

3条回答
  •  误落风尘
    2020-12-03 19:07

    Another option is to popen not the desired process but runas ... command. Note that the Run As service should be enabled and running.

提交回复
热议问题