I am trying to have an app always run as another user. I know you can launch the app as another user via editing the shortcut but then when you double click a file it runs as you and not other user.
I have tried to put a bat file with the correct command line
@ runas /savecred /user:MYDOMAIN\myuser "C:\Program Files\Myapp\app.exe"
and set it as "default program" to open the file But then it does not open the file just the app as there is no callback to the original file.
Do you know of any way to pass the calling path/file to the bat file ? Or regedit the default runas user ?
I have carefully read what is said here regarding the /savecred but my case is on safe PC and just for myself for daily comfort. And the goal is really not to have to juggle shortcuts and credentials.
I am open to regedit/powershell/batch or other.
Thanks a lot for the help