Login to participate
Endpoint Management & Virtualization DownloadsRSS

VBScript to Create Windows Firewall Exclusions for Mcafee ePO

aspen's picture

You may be able to deploy the Mcafee ePO client to PC's but it may not be able to communicate with the server. The following script adds the needed exception to the Windows firewall so that it may establish communication. This script can also be easily modified to allow the import of any registry value with a little effort.


' Windows firewall fix for EPO Agent
' v 1.0
' Aspen Skiens
' 4/24/09
' ----------------------------------------'

Option Explicit
Dim objShell
Dim strValue, strData, strWinKey, strKeyType

' Set the string values
' Set Data Value
strValue = "8081:TCP:*:enabled:ePOUpdate"
' Set Data 
strData = "8081:TCP:*:enabled:ePOUpdate"
' Set Key
strWinKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\GloballyOpenPorts\List\"
' Set Key type
strKeyType = "REG_SZ"
' Create the Shell object
Set objShell = CreateObject("WScript.Shell")

' Add the registry entry to add the exception
objShell.RegWrite strWinKey & strValue, strData, strKeyType

' Close script
WScript.Quit