Wireless
Participate in insightful discussions regarding issues related to Intel® Wireless Adapters and technologies
7441 Discussions

Changing the Wol settings on a Nic

idata
Employee
1,352 Views

I'm working on a script to change the Wake on lan settings for a nic. I've loaded the intel proset software and able to read the values for wol. In the vbs script below. I'm having problems calling the SetWakeOnLanPowerOptions. Could someone take a quick look and let me know howto fix.

Joe--

'ON error resume next

strComputer = "."

 

Set objWMIService = GetObject("winmgmts:" _

 

& "\\" & strComputer & "\root\IntelNCS2")

 

Set colItems = objWMIService.ExecQuery _

 

("Select * from IANet_PhysicalEthernetAdapter")

 

For Each objItem in colItems

'** This call in the program gets the wol properties **

 

output = objItem.GetWakeOnLanPowerOptions( WakeOnMagicePacketFromPowerOff, WakeOnLink , WakeOnMagicPacket, WakeOnDirectedPacket)

Wscript.echo "Wake Machine from Poweroff State" & WakeOnMagicePacketFromPowerOff

 

Wscript.echo "Wake the machine when Link is Present " & WakeOnLink

 

Wscript.echo "Wake the machine on Magic Packet " & WakeOnMagicPacket

 

Wscript.echo "Wake the machine on Directected Packet " & WakeOnDirectedPacket

'** This call is trying to set all options on **

 

output = objItem.SetWakeOnLanPowerOptions( 1 , 1 , 1 , 1, 1)

 

Next
0 Kudos
1 Reply
idata
Employee
469 Views

Did you by chance figure this out?

All I could determine from your script is that WakeOnMagicePacketFromPowerOff is not capturing a value of any kind; it is coming back NULL\BLANK on your ECHO tests (on the machine I am testing on).

0 Kudos
Reply