This script will add Disk Cleanup to the right click drive menu. (VBScript)

'Add Disk CleanUp, Drive Right Click Menu

On Error Resume Next

Dim WSHShell, Message

Set WshShell = WScript.CreateObject("WScript.Shell")
Message = "This script will add disk clean up to the right click drive menu." & vbCr &vbCr
Message = Message & "Continue?"

X = MsgBox(Message, vbYesNo + vbQuestion, "Paul's XP and Vista Tweaks")
If X = 6 Then
WshShell.RegWrite "HKEY_CLASSES_ROOT\Drive\shell\diskcleanup\", "Disk CleanUp", "REG_EXPAND_SZ"
WshShell.RegWrite "HKEY_CLASSES_ROOT\Drive\shell\diskcleanup\command\", "cleanmgr.exe /d %1", "REG_EXPAND_SZ"

MsgBox "Done!" & vbCrLf & "Disk Clean Up was added to the Drive right click menu." &vbcr & vbcr &_
"This script was downloaded from www.paulsxp.com.",64, "Clean Up Added"

End If

Download


Back to Line 31