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
Depending on your needs the Win32 API "CreateProcessWithLogonW" is easier to use than the "CreateProcessAsUser / LogonUser" functions.
From MSDN Docs:
The CreateProcessWithLogonW and CreateProcessWithTokenW functions are similar to the CreateProcessAsUser function, except that the caller does not need to call the LogonUser function to authenticate the user and get a token