Windows has a feature known as secondary logon that allows a logged in user to run an application with another user’s credentials. On Windows 8 and 7 this option is visible only when the extended context menu is visible. To access the option, right-click on an executable file with the Shift key pressed.
That’s a handy feature if you want to run a program; but what if you wanted to delete a file created by another user?
In this post I’ll show you how to delete files and folders that were created under a different account in Windows. You can use this method if you don’t want to log off and re-login just to delete some files.
Open the Run dialog box or Command Prompt and enter this command:
runas /user:other-account-name cmd
You’ll get a prompt for the account password, enter it and you should be able to access that accounts files and folders. Now simply navigate to the file/folder you wish to delete, and run the
When you’re done, just close the console window to continue using your account.
An easier method would have been to just run the File Explorer as another user, but sadly this functionality was removed with the implementation of enhanced “security features” in Windows 7, so missing from Windows 8 as well. Because of this limitation,
runas different user option does accept credentials of an admin user, but it will be running as that user with non-elevated credentials.
Tip: If you don’t remember the account’s password, reset it with this command:
net user other-account-name new-password