I am testing an application which communicates to a server via a UDP port, and I need to block this port to make sure the application can handle it.
The Problems:
1. It has to be done in an automated test (which is controlled by VBScripts).
2. It has to be done in Windows XP, without using a firewall.
I have tried this:
Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy.CurrentProfile
Set colPorts = objPolicy.GloballyOpenPorts
Set objPort = colPorts.Item(9999,6)
objPort.Enabled = FALSE
but it did not work.