running under different user in windows
Answered
I need to run the application under a different user, how can i do it?
I found I can use PSTools https://docs.microsoft.com/en-us/sysinternals/downloads/pstools to run a command under a different user but I couldn't find a way to run a generic command using parameters from a given application, i need to compile my application and use it's jar
Is there a way to do it without building a new idea plugin?
Thank you
Please sign in to leave a comment.
IntelliJ IDEA Run/Debug configuration doesn't support running with a different user. Since it just starts `java` process from the configured project JDK, one could try to create a wrapper for java.exe/javaw.exe that will change the user, then run the actual java.exe/javaw.exe from this user and pass all the parameters.
I tried this, and found PSTools that can change the user
but i needed to change to command, or switching the java.exe is the only solution?
You can't configure the command IntelliJ IDEA uses to run JVM, so you need to change java.exe.