Option Explicit 'declaring the shell control for a windows firewall and the command to pass in to windows shell Dim wshShell, command 'declaring var to handle user selection Dim inputControl 'debugging purposes... On Error Resume Next 'creating dialogue box to take user input inputControl = InputBox("Please enter enable to turn chat on. Enter disable to turn chat off. Click OK when done or click cancel to close.","Battle.net Authentication Controller") 'handling user input and executing action If lcase(inputControl) = "enable" Then 'Instructions to enable the Battle.net authentication service to appear online. MsgBox "Enabling Battle.net authentication service. Click OK to continue." Set wshShell = WScript.CreateObject("WScript.Shell") command = "netsh advfirewall firewall delete rule name=BNetChat" 'Deleting the rule that blocks the Battle.net authentication port. wshShell.Run command, 0, False MsgBox "Battle.net authentication service has been restored." ElseIf lcase(inputControl) = "disable" Then 'Instructions to disable the Battle.net authentication service to appear offline. MsgBox "Disabling Battle.net authentication service. Click OK to continue." Set wshShell = WScript.CreateObject("WScript.Shell") command = "netsh advfirewall firewall add rule name=BNetChat dir=out action=block protocol=TCP remoteport=1119" 'Creating the rule that blocks the Battle.net authentication port. wshShell.Run command, 0, False MsgBox "Battle.net authentication service has been disabled." Else 'If nothing is selected, do nothing. MsgBox "No options selected. Closing now." End If 'debugging purposes... On Error Goto 0