How to change the name of the Recycle Bin
By right clicking on the Recycle Bin Windows doesnīt give you the option to change the
name like other Shortcuts.
This trick shows how to enter the registry and change the Recycle Bin name setting.
Create a new project with 1 module and 1 form.
EWX_LOGOFF = 0
Public Const EWX_SHUTDOWN = 1
Public Const EWX_REBOOT = 2
Public Const EWX_FORCE = 4
Declare Function ExitWindowsEx Lib
"user32" (ByVal _
uFlags As Long, ByVal dwReserved As Long) As Long
HKEY_CLASSES_ROOT = &H80000000
Declare Function RegCreateKey Lib "advapi32.dll" _
Alias "RegCreateKeyA" (ByVal Hkey As Long, ByVal _
lpSubKey As String, phkResult As Long) As Long
Declare Function RegCloseKey Lib "advapi32.dll" _
(ByVal Hkey As Long) As Long
Declare Function RegSetValueEx Lib "advapi32.dll" _
Alias "RegSetValueExA" (ByVal Hkey As Long, ByVal _
lpValueName As String, ByVal Reserved As Long, ByVal _
dwType As Long, lpData As Any, ByVal cbData As Long) _
Public Const REG_SZ = 1
Public Const REG_DWORD = 4
savestring(Hkey As Long, strPath As _
String, strValue As String, strdata As String)
Dim keyhand As Long
Dim r As Long
r = RegCreateKey(Hkey, strPath, keyhand)
r = RegSetValueEx(keyhand, strValue, 0, _
REG_SZ, ByVal strdata, Len(strdata))
r = RegCloseKey(keyhand)
form put 1 command button and add the following code to the
'prompts for new name
strString$ = InputBox("Please type in a string to save to the
Registry.", "Recycle Bin")
If strString$ = Empty Then
'string is empty or cancel is pressed
MsgBox "Empty String", vbCritical,
'API call to store new name
Call savestring(HKEY_CLASSES_ROOT, _
MsgBox "Reset your PC", ,
"Changes are made"
'resets your PC
t& = ExitWindowsEx(EWX_FORCE Or EWX_REBOOT,
Execute the app. and click on the commandbutton, enter the new name for the recycle bin
and your PC will reset.
Then take a look at itīs new name!
~Iīve experienced that some API calls give an error under different versions of
If an error occurs in resetting your PC try:
t& = ExitWindowsEx (EWX_REBOOT, 0)
Shame on you Bill where is the backwards compatibility?!