Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Disable creation of $recycle.bin folder?

08 Dec 2009   #1
trond

Windows 7 64bit
 
 
Disable creation of $recycle.bin folder?

Is there any way to disable the creation of the $recycle.bin folder in the root directory of all harddrives? Disable all recycle bin functions globally & permanently?

In the recycle bin properties I've chosen to delete all files directly and not move them to the recycle bin, yet everytime I connect a new harddrive (I've got 8 hot-swap bays), this option is reset for that particular drive and Windows 7 creates a $recycle.bin folder in the root directory. It really annoys me.


My System SpecsSystem Spec
.

08 Dec 2009   #2
logicearth

Windows 8.1 Pro (x64)
 
 

Turn off show hidden files....You'll never see it again.
My System SpecsSystem Spec
08 Dec 2009   #3
trond

Windows 7 64bit
 
 

That's not what I am asking for. That's like closing your eyes to the problem.

I don't want that directory on the drive, at all.

Doesn't solve the problem that Windows 7 resets the setting to directly delete files for every new drive I attach either.
My System SpecsSystem Spec
.


08 Dec 2009   #4
logicearth

Windows 8.1 Pro (x64)
 
 

Well you are looking for a solution to a problem that doesn't have a solution. So what am I suppose to say?
My System SpecsSystem Spec
08 Dec 2009   #5
trond

Windows 7 64bit
 
 

I couldn't tell from your first reply that there's no solution, so I guess that's what you should have said.

I was hoping there would be some registry hack, some service to disable, or some third party tool that could completely disable the recycle bin.
My System SpecsSystem Spec
08 Dec 2009   #6
Brink
Microsoft MVP

64-bit Windows 10 build 10159
 
 

Hello Trond,

Sorry, but you cannot disable or get rid of the Recyle Bin since it is integrated into Windows 7. You can however have it set to delete files immediately instead of them being placed in the Recycle Bin first, and remove the Recycle Bin from the desktop.

Hope this helps,
Shawn
My System SpecsSystem Spec
09 Dec 2009   #7
trond

Windows 7 64bit
 
 

Thanks, but as I wrote in the initial post, I've already done that. The other problem, as I wrote, is also that everytime I attach a new drive, that setting is reset on the new drive.

In XP, you can use GPEdit to enable "Do not move deleted files to Recycle Bin". This permanently disables the Recycle Bin on all drives, also new drives that you attach, and works very well on an old XP computer I got.

I've yet to find such a global setting in Windows 7. Unfortunately, I use Home Premium, it doesn't have GPEdit so I don't know if that option exists in Windows 7 also. But all settings in GPEdit should have a registry equivalent, so if GPEdit in Windows 7 Pro+ do have this setting, perhaps it's possible to enable it in the registry.
My System SpecsSystem Spec
09 Dec 2009   #8
yowzer

Windows 7 Ultimate
 
 

You could look in this excel spreadsheet and see if there's an entry. Excel 2007 format.


Attached Files
File Type: zip WindowsServer2008R2andWindows7GroupPolicySettings.zip (573.3 KB, 744 views)
My System SpecsSystem Spec
15 Jun 2010   #9
mjose

Win 7 Ultimate 64-bit
 
 

My System SpecsSystem Spec
01 Apr 2011   #10
HSV Guy

Windows 7 Ultimate x64
 
 

Yes this can be done... because I got annoyed that it can't be done so I wrote a script to do it (see below). It works for me but if you have any issues yourselves you may need to tweak it a bit. Have fun .

Code:
' Author:      HSV Guy
' Description: Script to remove Recycle Bin folder. Run on Windows startup or login.
' Notes: 1)    See http://www.sevenforums.com/tutorials/11949-elevated-program-shortcut-without-uac-prompt-create.html
'              for how to run programs/scripts with elevated permissions without a UAC prompt.
'        2)    Update value of RECYCLEBIN as per version of Windows (configured for Windows 7).
' Date:        1 April 2011

Dim SILENT
SILENT = TRUE

Call RunElevated

Dim filesys, drv, drvcoll, folder, RECYCLEBIN
RECYCLEBIN = ":\$Recycle.Bin\"

Set filesys = CreateObject("Scripting.FileSystemObject")
Set drvcoll = filesys.Drives


For Each drv in drvcoll
  If drv.IsReady And filesys.FolderExists(drv.DriveLetter & RECYCLEBIN)  Then
     Set folder = filesys.GetFolder(drv.DriveLetter & RECYCLEBIN)
	 MyMsgBox "About to delete: " & folder
	 folder.Delete
  Else
    MyMsgBox "Skipped " & drv.DriveLetter & ". Folder doesn't exist or device not ready."
  End If  
Next

'Source code of RunElevated function shamelessly taken from:
' http://www.insidethe.com/blog/2009/12/how-to-launch-a-wsh-vbscript-as-administrator-in-windows-7-and-vista/
Function RunElevated
	If WScript.Arguments.Named.Exists("elevated") = False Then
		'Launch the script again as administrator
		CreateObject("Shell.Application").ShellExecute "wscript.exe", """" & WScript.ScriptFullName & """ /elevated", "", "runas", 1
		WScript.Quit
	Else
		'Change the working directory from the system32 folder back to the script's folder.
		Set oShell = CreateObject("WScript.Shell")
		oShell.CurrentDirectory = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
		 MyMsgBox "Now running with elevated permissions" & SILENT
	End If
End Function

Function MyMsgBox(Message)
	If Not SILENT Then MsgBox Message
End Function
My System SpecsSystem Spec
Reply

 Disable creation of $recycle.bin folder?




Thread Tools





Similar help and support threads
Thread Forum
How to disable creation of BootCKCL.etl
Hi, I've disabled Circular Kernel Context Logger from Performance Monitor but the file in C:\Windows\System32\wdi\LogFiles is still getting created and the size of it increases over time while using the computer. I pretty often get errors in Event Logger about it. Like: The maximum file size...
Performance & Maintenance
Disable Roaming Profile Creation
Bad title? Back story: Got a refurbished machine, when to work on it to set it up to work on my network. Created a new user for the machine. It's using a roaming profile. I have no problems at this point with deleting that user and starting again, have not gotten that far into setting...
Network & Sharing
Disable Automatic System Restore Point Creation?
Is it possible to disable automatic System Restore Point creation (to prevent Windows to create restore points daily and after (re)installing programs / Windows updates)? I want to manually create System Restore Points because automatic creation uses too much space, because I install new...
Backup and Restore
How to disable automatic restore point creation
I wonder if it's possible to disable automatic restore point creation, and ONLY have Windows 7 store on demand system restore points that I choose to manually create at my convenience. If I go to Administrative Tools/Task Scheduler/System Restore I find two schedule triggers. Will disabling those...
Backup and Restore
Disable user password creation & more
I am having trouble with the following tasks: Disable a user from creating AND changing their password Disable a user from installing ANYTHING (I used the elevated option on the windows installer group policy editor, but I tested it out on the account and they were still able to install steam...
System Security
Stop folder creation
How can I stop the following folders being created? Vuze DVDs - No information contained within when created Transcodes - No information contained within when created :confused:
Software

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 05:11.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App