Jump to content

Trolderik

Members
  • Posts

    3
  • Joined

  • Last visited

About Trolderik

  • Birthday 12/10/1968

Profile Information

  • Location
    Denmark

Trolderik's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi! Do you have any examples of use ? Regards Trolderik
  2. $IPADRESSE = StringSplit(@IPAddress1,".") $Broadcast = $IPADRESSE[1] & "." & $IPADRESSE[2] & "." & $IPADRESSE[3] & "." & "255" $MACAddress = "020000D00406" UDPStartUp() $connexion = UDPOpen($Broadcast,7) UDPSend($connexion, GenerateMagicPacket($MACAddress)) UDPCloseSocket($connexion) UDPShutdown() ; =================================================================== ; Functions ; =================================================================== ; This function convert a MAC Address Byte (e.g. "1f") to a char Func HexToChar($strHex) Return Chr(Dec($strHex)) EndFunc ; This function generate the "Magic Packet" Func GenerateMagicPacket($strMACAddress) $MagicPacket = "" $MACData = "" For $p = 1 To 11 Step 2 $MACData = $MACData & HexToChar(StringMid($strMACAddress, $p, 2)) Next For $p = 1 To 6 $MagicPacket = HexToChar("ff") & $MagicPacket Next For $p = 1 To 16 $MagicPacket = $MagicPacket & $MACData Next Return $MagicPacket EndFunc This will auto generate the broadcast address and wake up the PC with MAC = 020000D00406 Regards Trolderik
  3. Why not use: Shutdown command?Beyondexecv2 from Beyond Logic?PSShutdown from Sysinternals? I've made a program that collects all the MAC-addresses from PC connected to the network. Then the program starts all the PC's at 7:00 am with WOL and shuts them down at 6:00 pm. No actions in weekends. That saves a lot of power when the users forget to turn off their computer. Regards Trolderik
×
×
  • Create New...