Why does impersonating a process return “The directory name is invalid”?

后端 未结 1 1494
被撕碎了的回忆
被撕碎了的回忆 2020-12-20 20:27

I have a process that needs to run under administrative privileges. I need the average joe to run the process, but I don\'t want to give everyone access... so I\'ve created

相关标签:
1条回答
  • 2020-12-20 21:23

    It could be because you're not setting the WorkingDirectory property. According to the docs:

    Important Note:

    The WorkingDirectory property must be set if UserName and Password are provided. If the property is not set, the default working directory is %SYSTEMROOT%\system32.

    0 讨论(0)
提交回复
热议问题