OT: Somewhat: PC wake-up program?
-
- HouseBot Guru
- Posts: 757
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
OT: Somewhat: PC wake-up program?
Excuse the somewhat off-topic.. but if anyone is going to know how to do this you guys will. I'd like to install a program on my PC what will wake it up out of standby every hour or so (variable maybe) so that it can go off and find updates to my virus and spyware programs. Typically, I keep my "everyday" PC in standby mode when not using it. But when I actually want to use it it takes sometimes many minutes to get to the point where I can actually DO something. In the meantime the virus (avast) and spyware (Spysweeper) programs poll their hosts and if updates are available they are downloaded and installed. Necessary but a royal PITA to wait on. So I figured if I had a program that woke up the PC several times a day those updates would already be taken care of by the time I actually wanted to use the PC for something. But maybe I'm getting old and cranky.
Steve
Re: OT: Somewhat: PC wake-up program?
Depending on the age of the computer, it may have startup and shutdown times in the BIOS. Alternatively, to wake up the PC, you can send it a WOL (Wake-On-LAN) packet from another computer. Here's a VBScript example based on the UltraWOL COM object from UltraJones: http://www.robvanderwoude.com/vbstech_network_wol.html
Terry
Code: Select all
Dim objWOL
Set objWOL = CreateObject( "UltraWOL.ctlUltraWOL" )
objWOL.BroadcastAddr = "192.168.0.255"
' The MAC address of the computer to be woken
objWOL.MACAddr = "AA-BB-CC-DD-EE-FF"
' The local computer's IP address
objWOL.LocalIP = "192.168.0.4"
objWOL.WakeUp
-
- HouseBot Guru
- Posts: 757
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
Re: OT: Somewhat: PC wake-up program?
Thanks Terry, I'll try it once the Christmas dust settles.
Steve
-
- HouseBot Guru
- Posts: 757
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
Re: OT: Somewhat: PC wake-up program?
Interesting. Works like a champ outside of HB, i.e. called from an file explorer window. But creating a device and running it from within the HB server does not wake up the target PC. The History tab for the device shows it going from stopped to running then back as it should but the PC is not awakened.
Steve
Re: OT: Somewhat: PC wake-up program?
Then try using an execute program device and Cscript or Wscript with command line args pointing to the script. This will run it external to HB.
Osler
Osler
-
- HouseBot Guru
- Posts: 757
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
Re: OT: Somewhat: PC wake-up program?
Over my head I was working within HB so that I could set a timer to run the wake-up script periodically. Besides. it SHOULD run from within HB. (Actually it does run; it just doesn't do anything.) I'll work on it more this weekend.
Steve
Re: OT: Somewhat: PC wake-up program?
cscript.exe is the command line way to access the windows scripting host. If you set up a execute program device (instead of a script device) for the program cscript.exe and put the full path to the script you want to execute in the command line arguments parameter of the execute program device, it will run the script, not using the scripting host provided in HB but the full version included with Windows.
Progam to execute: C:\WINDOWS\SYSTEM32\cscript.exe
Command Line Parameters: C:\Program Files\HouseBot\Config\Scripts\<my script>.vbs
You may need quotes around the command line parameters.
Also, check to make sure you have your firewall permission set correctly for HB to access the network.
Osler
Progam to execute: C:\WINDOWS\SYSTEM32\cscript.exe
Command Line Parameters: C:\Program Files\HouseBot\Config\Scripts\<my script>.vbs
You may need quotes around the command line parameters.
Also, check to make sure you have your firewall permission set correctly for HB to access the network.
Osler
-
- HouseBot Guru
- Posts: 757
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
Re: OT: Somewhat: PC wake-up program?
"I see!" said the blind man. I'll try it tonight. Thanks to you both for the help.
Steve
-
- HouseBot Guru
- Posts: 757
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
Re: OT: Somewhat: PC wake-up program?
Works great! Thanks for the help and cscript lesson; I learned something new - never too old.
Steve