Windows 7 Tutorial

Run a program as a different user in Windows 7

Whenever you open an application in Windows 7, it will automatically run "under your profile": this means that the program will use your credentials and user privileges, and that it will look for the documents in your "Documents" folder, save your settings under your "%appdata%" roaming directory, etc. This all happens behind the scenes, because you nearly never have to worry about these details - the only case most of us come across having to change user profile is when a program needs to run with "administrative privileges", and you are not currently logged in as an administrator. But Windows 7 lets you launch any program as another user, so long as you can provide that user's credentials.


Run a program as an administrator (without switching profile)

Let's first start with a special case, how to an application under another profile without logging off, and run a program as an administrator, needed at times to edit system files, for example:

If you are a "standard user" (how to change your type of user account), keep in mind that this program's settings will be saved under the default administrator account for which you have supplied credentials, since there can be more than one administrator on any Windows 7 PC. If you are already running as an administrator, that application will save its settings under your own profile.

Note that Windows 7 will only show the "Run as administrator" option for true executables (that is, files whose extension is ".exe"). In some cases, like "*.hta" files, the way around this limitation is to create a shortcut to that file, and make the shortcut launch with elevated privileges (through right-click > Properties), or creating a batch file that launches the application while itself running with administrative privileges.

Run a program as another user (administrator or standard user)

The principle is quite similar to launch an application under a different profile:

And this is all it takes to run that program under someone else's profile! Keep in mind that this application's privileges are those of the logon you provided, and this is where that program settings, if any, will be saved - another Windows 7 security feature will also prevent you (without some tricks on your part) from seeing files inside your own Desktop or Documents folders, but you can save anything you like under the Public folder for anyone to see and access.

up ↑
Copyright © 2016 Windows 7 Tutorial. All rights reserved — Sitemap | Disclaimer | Feedback