On Error Resume Next
dim r,d,str
str="Restriction: Disable 'turn off Computer' "
d = MsgBox("This will disable the shutdown option" & vbcrlf & "Click yes/no to Enable/Disable Restriction",1,str)
Set r = CreateObject("Wscript.Shell")
if d=1 then
r.RegWrite "HKCU\Software\Microsoft\Windows\Current
dim r,d,str
str="Restriction: Disable 'turn off Computer' "
d = MsgBox("This will disable the shutdown option" & vbcrlf & "Click yes/no to Enable/Disable Restriction",1,str)
Set r = CreateObject("Wscript.Shell")
if d=1 then
r.RegWrite "HKCU\Software\Microsoft\Windows\Current
Version\Policies\Explorer\NoClose","1","REG_SZ"
msgbox "Restriction : ENABLED",0,str
else
r.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoClose","0","REG_SZ"
msgbox "Restriction : DISABLED",0,str
end if
msgbox "Restriction : ENABLED",0,str
else
r.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoClose","0","REG_SZ"
msgbox "Restriction : DISABLED",0,str
end if