To run any command under the credentials of a different user, *nix systems have the sudo command. For example:
To run a program under the credentials of a different user under Windows, you can use the runas command.
i use this command to quickly create batch files which i can drop into my c:windowssystem32 folder for immediate path happiness