Hi,
I got this vbscript that clears system tray notification icons by deleting two registry entries.
The problem is I want to execute this when logging off but it displays two messages;
and I want someone to instruct me how to remove that message but continue executing the script.
here is the script;
------------------------------------------------------------------------------
Message = "To work correctly, the script will close" & vbCR
Message = Message & "and restart the Windows Explorer shell." & vbCR
Message = Message & "This will not harm your system." & vbCR & vbCR
Message = Message & "Continue?"
X = MsgBox(Message, vbYesNo, "Notice")
If X = 6 Then
On Error Resume Next
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TrayNotify\IconStreams"
WshShell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TrayNotify\PastIconsStream"
Set WshShell = Nothing
On Error GoTo 0
For Each Process in GetObject("winmgmts:"). _
ExecQuery ("select * from Win32_Process where name='explorer.exe'")
Process.terminate(0)
Next
MsgBox "Finished." & vbcr & vbcr & "© Doug Knox and Kelly Theriot", 4096, "Done"
Else
MsgBox "No changes were made to your system." & vbcr & vbcr & "© Doug Knox and Kelly Theriot", 4096, "User Cancelled"
End If
------------------------------------------------------------------------------
Can you help me remove the message popups?
Thank you in advance.