Skip navigation

JSI Tip 7267. How do I prevent users from altering the Recycle Bin Properties?


To remove the Properties dialog from the Recycle Bin context menu, I have scripted NoPropertiesRecycleBin.bat.

The syntax for using NoPropertiesRecycleBin.bat is:

NoPropertiesRecycleBin \[/a\]

where /a is an optional parameter that prevents any user of the computer from altering the Recycle Bin Properties. If the /a is omitted, only the current users is prevented from altering the Recycle Bin Properties.

NoPropertiesRecycleBin.bat contains:

@echo off
set key=HKEY_CURRENT_USER
@echo REGEDIT4>%TEMP%\NoPropertiesRecycleBin.reg
@echo.>>%TEMP%\NoPropertiesRecycleBin.reg
if /i \{%1\}==\{/a\} set key=HKEY_LOCAL_MACHINE
@echo \[%key%\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\]>>%TEMP%\NoPropertiesRecycleBin.reg
@echo "NoPropertiesRecycleBin"=dword:00000001>>%TEMP%\NoPropertiesRecycleBin.reg
@echo.>>%TEMP%\NoPropertiesRecycleBin.reg
regedit /s %TEMP%\NoPropertiesRecycleBin.reg
del /q %TEMP%\NoPropertiesRecycleBin.reg
NOTE: If you used the /a parameter, you must shutdown and restart for the setting to become effective. If the /a was omitted, the current user must log off for the setting to become effective.



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish