'Add Disk CleanUp, Drive Right Click Menu, XP

Dim WshShell, Object, Message, M, ulnput 

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

Message = "This script will add Disk Clean Up to the right click drive menu." & vbCr & vbCr _
& "Press ""Yes"" make a Restore Point and continue this script." & vbCr & vbCr _
& """No"" continue script without a Restore Point."  & vbCr & vbCr _
& "or ""Cancel"" to quit."

ulnput = MsgBox(Message, vbYesNoCancel + vbInformation, "Paul's XP, Vista and Windows 7 Tweaks")
If ulnput = vbNo Then 
ElseIf ulnput = vbCancel Then WScript.Quit
 Else

Result = WshShell.Popup("It will take about 10 to 15 seconds to create this Restore Point.", 2, "Creating Restore Point", 64)

Set SRP = getobject("winmgmts:\\.\root\default:Systemrestore")
sDesc = "Add Disk CleanUp Restore Point"
sOut = SRP.createrestorepoint ( sDesc, 12, 100)

MsgBox "Add Disk CleanUp, Restore Point successfully created on"  & "  " &  Date & "  at  " & Time  & vbCr & vbCr & _
"Press ""OK"" to continue running this script.",64, "Done"

If sOut <> 0 Then

MsgBox "Restore Point creation Failed!"
Else
End If
End If

WshShell.RegWrite "HKCR\Drive\shell\diskcleanup\", "Disk CleanUp", "REG_SZ"
WshShell.RegWrite "HKCR\Drive\shell\diskcleanup\command\", "cleanmgr.exe /d %1", "REG_SZ"

Message =  "Add Disk CleanUp has been added to the Drive Right Click Menu." & vbCr & vbCr _
 & "Don't forget to hit F5 to refresh your desktop." & vbCr & vbCr _
 & "This script was downloaded from www.paulsxp.com."
MsgBox Message, 64, "Done!" 

If MsgBox("If you find this script was helpful and you would like to make a Donation?" & vbCr & vbCr & "Click Yes to visit my Donation page at Paul's Web Site." & vbCr & vbCr & _
 "All donations are made thru PayPalŪ.", vbInformation + vbYesNo + vbDefaultButton, "Make a Donation") = 6 Then
WshShell.Run "http://www.paulsxp.com/donation.html"

End If
End If


