Rename the Recycle Bin. (VBScript)

'Rename the Recycle Bin

Dim WshShell, ObjShell, rRead, sRead, cChange, bBox, sMsg, sInput

Set WshShell = WScript.CreateObject("WScript.Shell")
If WScript.Arguments.length = 0 Then
Set ObjShell = CreateObject("Shell.Application")
ObjShell.ShellExecute "wscript.exe", """" & _
WScript.ScriptFullName & """" & " uac","", "runas", 1
Else
sMsg = "This script will Rename the Recycle Bin." & vbCr & vbCr _
& "Would you like to continue?"

sInput = MsgBox(sMsg, vbYesNo + vbInformation, "Paul's XP and Vista Tweaks")
If sInput = vbYes Then

sRead = "HKCR\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\"

rRead = WshShell.RegRead(sRead & "LocalizedString")
cChange = "Change the name of The Recycle Bin"
bBox = InputBox("Type in the new name for the Recycle Bin.", cChange, rRead)
If bBox <> "" Then
WshShell.RegWrite sRead & "LocalizedString", bBox

Message = "Recycle Bin has been Renamed!" & vbCr & vbCr _
& "This script was downloaded from www.paulsxp.com."
MsgBox Message, 64, "Paul's XP and Vista Tweaks"
End If
End If
End If

Download


Back to Line 12