badp
Had this question 3
Question
badp asked on
| 2992 views

Unable to (properly) access another users' recycling bin.

I am using Windows 7 daily as a limited user with UAC enabled. I log in as $USER and have have a dummy user called $ADMIN with Administrative access I use for elevation purposes.

Unfortunately, some elevated applications are aware of being elevated: running Explorer as admin still shows $USER's folders and permissions. Some other applications are not, and will try and access $ADMIN's folders and permissions.

In particular, I used Tune-Up's TuneUp 2010 to find and delete cruft from my system. Unfortunately, when TuneUp deletes files it uses the $ADMIN's recycling bin.

I don't want to log in as $ADMIN. It's a dummy account. It isn't supposed to be logged into. It's just there for elevation purposes. I don't want it to have a profile, a home folder and settings. In short I don't want to log in with it.

I want to use elevation to access $ADMIN's recycle bin and cleanly empty it. Windows seems to offer no way to do so, unfortunately:

  • Running Explorer as $ADMIN from the GUI will result in the $USER's folders being used.
  • Running explorer as $ADMIN from the command prompt (using the elevate powertoy, for example) results in the following error message:

    [Window Title]
    explorer.exe

    [Content]
    Windows cannot access the specified device, path, or file.  You may not have the appropriate permissions to access the item.

    [OK]

  • Running "start ." from an elevated command prompt results in the above error message.
  • Running notepad as $ADMIN and using the Open dialog as a primitive Explorer shows no way to access the recycling bin. Right clicking files from that screen will result in a temporary hang and in no menu being shown.
  • Attempting to open the raw Recycling bin folder, C:\$Recycle.Bin\S-1-5-21-1970411373-1708269306-xxxxxxxxxx-1007\, from the above Open dialog results in the following error message:

  • [Window Title]
  • Open

  • [Content]
  • Recycle Bin
  • You don’t have permission to open this file. 

  •  Contact the file owner or an administrator to obtain permission.

  • [OK]

I "fixed" the issue by issuing "del * /S /F /Q" from an elevated prompt inside C:\$Recycle.Bin\S-1-5-21-1970411373-1708269306-xxxxxxxxxx-1007\ but that's obviously not the way to go.

What should have I done instead?
badp
Found this helpful 1
Answer
badp replied on
Start an elevated copy of a program with a modern Open file dialog (like Notepad), click in the location box to switch to text input mode, type 'Recycle Bin' and press Enter. You can manage the bin from there.

It's a kludge but it works.
badp
Found this helpful 0
badp replied on
For your benefit, I also asked here.
badp
Found this helpful 1
Answer
badp replied on
Start an elevated copy of a program with a modern Open file dialog (like Notepad), click in the location box to switch to text input mode, type 'Recycle Bin' and press Enter. You can manage the bin from there.

It's a kludge but it works.
Vinod N
Found this helpful 0
Vinod N replied on
Microsoft

Reply

Hey badp,

Glad to know that you fixed the issue!

Thank you for sharing the resolution with us.

Regards,

Savan - Microsoft Support.