VBScript
VBScript
Send a Wake-on-LAN Packet with a SecureOn Password
See more Socket/SSL/TLS Examples
Demonstrates Socket.SendWakeOnLan2, which sends a Wake-on-LAN magic packet that includes a SecureOn password.
Background. The password is a hexadecimal string representing four or six bytes and should come from a secure source. This is otherwise the same as SendWakeOnLan.
Chilkat VBScript Downloads
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)
success = 0
set socket = CreateObject("Chilkat.Socket")
' Send a Wake-on-LAN magic packet that includes a SecureOn password. The password is a hexadecimal
' string representing four or six bytes, and should come from a secure source rather than being
' hard-coded.
secureOnPassword = "AABBCCDDEEFF"
success = socket.SendWakeOnLan2("000102030405",9,"255.255.255.255",secureOnPassword)
If (success = 0) Then
outFile.WriteLine(socket.LastErrorText)
WScript.Quit
End If
outFile.WriteLine("Wake-on-LAN packet sent.")
outFile.Close