Message="Toworkcorrectly,thescriptwillclose"&vbCR
Message=Message&"andrestarttheWindowsExplorershell."&vbCR
Message=Message&"Thiswillnotharmyoursystem."&vbCR&vbCR
Message=Message&"Continue?"
X=MsgBox(Message,vbYesNo,"Notice")
IfX=6Then
OnErrorResumeNext
DimWSHShell,n,MyBox,p,t,errnum,vers
Dimitemtype
Dimenab,disab,jobfunc
SetWSHShell=WScript.CreateObject("WScript.Shell")
p="HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerNoTrayItemsDisplay"
itemtype="REG_DWORD"
enab="ENABLED"
disab="DISABLED"
jobfunc="NotificationIconsarenow"
t="Confirmation"
Err.Clear
n=WSHShell.RegRead(p)
errnum=Err.Number
iferrnum<>0then
WSHShell.RegWritep,0,itemtype
EndIf
Ifn=0Then
n=1
WSHShell.RegWritep,n,itemtype
Mybox=MsgBox(jobfunc&disab&vbCR,4096,t)
ElseIfn=1then
n=0
WSHShell.RegWritep,n,itemtype
Mybox=MsgBox(jobfunc&enab&vbCR,4096,t)
EndIf
SetWshShell=Nothing
OnErrorGoTo0
ForEachProcessinGetObject("winmgmts:")._
ExecQuery("select*fromWin32_Processwherename='explorer.exe'")
Process.terminate(0)
Next
MsgBox"Finished."&vbcr&vbcr,4096,"Done"
Else
MsgBox"Nochangesweremadetoyoursystem."&vbcr&vbcr,4096,"UserCancelled"
EndIf