I’m trying to run the program I’m debugging as a different user. Now, this can be done by running the exe and attaching from Visual Studio, but this is cumbersome.
What I’ve tried to do is use the “RunAs” command:
command.com /C runas /env /user:OtherUser DebugTarget.Exe
But this is attached to command.com, Visual Studio wants an exe.
Now I can create a dummy app….but anyone have a better solution for this?
This works (I feel so idiotic):
The above command will ask for your password everytime, so for less frustration, you can use /savecred. You get asked only once. (but works only for Home Edition and Starter, I think)