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

后端 未结 5 1314
盖世英雄少女心
盖世英雄少女心 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:18

    I just ran across an alternative to the runas.exe program called MiniRunAs which will take the password on the command line - http://www.source-code.biz/snippets/c/1.htm

    If you are able to install it along with your application, that may prove simpler than writing a JNI DLL.

提交回复
热议问题