How can I create a new process with another User Account on Windows?

后端 未结 5 1278
盖世英雄少女心
盖世英雄少女心 2021-01-11 16:11

Is it possible to create a new process on windows with a different user account? I know there are a context menu \"Run as\" but I want do it from Java. I have the username a

5条回答
  •  执念已碎
    2021-01-11 16:17

    There is a program called "runas.exe." You could run that process and supply the appropriate arguments for your process and username/password. I think that's the simplest method.

提交回复
热议问题