I am running Java code on a remote windows 2012 server. The server will have multiple windows user accounts such as user X, user N, user W and so on.
I want to execute a specific section of code on each account while being logged into Administrator account.
Is it possible to execute a portion of code on another windows user account (i.e, login to account and then log out automatically)?
Note: This is not the same as:
How to get Windows username in Java? - as I already know the name of each account or Creating a Windows user account with java - as I know how to CREATE a new account but I don't know how to automatically login to account and execute code..
Thanks