I know this is very bad design, but this is a quick script that I developed after I posted my last post. I just thought I would share it with everyone. Like I mentioned, very bad design, but it does do the job. Here it is:
dim strKey,Value,check
Dim WSHShell
if msgbox("Would you like to enable the Pop-Up Blocker?",vbyesno,"Enable/Disable Pop-Ups") = "6" then
Set WSHShell = WScript.CreateObject("WScript.Shell")
on error resume next
strKey=WSHShell.RegRead ("HKCU\Software\Microsoft\Internet Explorer\New Windows\PopupMGR")
if err.number = 0 then
WSHShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\New Windows\PopupMGR", "1"
Else
If strKey = "" then
WSHShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\New Windows\PopupMGR", "1"
end If
if check = "1" then
msgbox "Pop-Up Blocker has been successfully enabled."
end if
else
Set WSHShell = WScript.CreateObject("WScript.Shell")
on error resume next
strKey=WSHShell.RegRead ("HKCU\Software\Microsoft\Internet Explorer\New Windows\PopupMGR")
if err.number = 0 then
WSHShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\New Windows\PopupMGR", "0"
Else
If strKey = "" then
WSHShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\New Windows\PopupMGR", "0"
end If
end if
check=WSHShell.RegRead ("HKCU\Software\Microsoft\Internet Explorer\New Windows\PopupMGR")
if check = "0" then
msgbox "Pop-Up Blocker has been successfully disabled."
end if
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.