

Set arrayNetCards = objWMIService.ExecQuery ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True") StrPnPCapabilitiesKeyName = "SYSTEM\CurrentControlSet\Control\Class\!\\.\root\cimv2") ' This script enables WOL and sets magic packets as the wakeup type.ĭim arrayNetCards 'Array of all connected NICsĭim strPnPCapabilitesKeyName 'Key Specific to the Network Adapters in CurrentControlSetĭim strPnPCapabilitesKeyName001 'Key Specific to the Network Adapters in ControlSet001

Sometimes that script will work assuming everything else is set correctly. XP, WS2003, Vista and later all use slightly different settings. The powerstate settings are different for different OSs. We need to set first the wakeup state then enable the adapter. When we use PoweCfg it sets these according to the driver and not just a registry setting. Each adapter can use a slightly different technique. It works for outbound but not when a remote connect asks for the system. It sets the Power settings that allow a local connection to wake up the adapter. Chen - that script does not set WOL settings.
