| In Windows Vista, it was possible to run as administrator by right clicking on a file and choosing “Run as administrator”. However, it wasn’t possible to run as a different user. When developing software, this can be really useful for testing—seeing if your program works with a specially-configured limited user, for example. In Windows 7 it appears to be the same issue; here’s the menu obtained by right-clicking in Windows 7:  However, in Windows 7, holding down the SHIFT key and then right-clicking adds a new option: “Run as different user”: This then allows the execution of the program or file by any user: Warning: In the past on x86 Vista, I used the ShellRunAs program from Windows Sysinternals to do this. When I tried this on my x64 Windows 7 machine, I found that it did not work correctly. The program ran, but my program was unable to open its own config file, and so it didn’t run correctly. I’m guessing that this might be an issue with ShellRunAs and x64. Since this functionality is now built into Windows 7 and works with x64, this isn’t really a problem for me. For a bit more about this, see http://forum.sysinternals.com/forum_posts.asp?TID=19939. |