This post was originally published here
This is just another post for the sake of my mental sanity because I’m always tired of looking up for this over and over again. While working on BizTalk Server projects, and in many other scenarios, we have to check if a specific user has access to specific resources in a file share or the file share itself, and we don’t want to disconnect (log off) from the machine and log on on the same machine using a different account. Sometimes, this account doesn’t have remote desktop access either.
So, the main question is: How to run Windows File Explorer as a different user?
There are several ways to accomplish this, but if you need to run File Explorer as a different user, the simplest way to accomplish that is by:
- Open the File Explorer, normally as we usually do, and access the following folder:
- C:Windows
- Scroll down until you find the explorer.exe executable, or search for this file in the search field in the upper right corner.
- Press the Shift key, and with the Shift key pressed, right-click on the explorer.exe file, and on the context menu, select Run as different user.
- In the Windows Security window that appears, you need to specify the name and password of the user under whose account you want to run the application and click OK.
- After this, a new File Explorer is open, running under the specified user account.
Any Windows user can run a program in his current session on behalf of another user using RunAs. This feature allows you to run any scripts (.bat, .cmd, .vbs, .ps1), executable files (.exe), or install applications (.msi, .cab) with the permissions of another user without the need to log off and log in on the machine with different users/credentials.
Hope you find this helpful! So, if you liked the content or found it helpful and want to help me write more content, you can buy (or help buy) my son a Star Wars Lego!