OT: Somewhat: PC wake-up program?

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
Steve Horn
HouseBot Guru
Posts: 755
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

OT: Somewhat: PC wake-up program?

Post by Steve Horn »

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. :oops:
Steve
roussell
Advanced Member
Posts: 268
Joined: Wed Dec 15, 2004 9:07 am
Location: Pelham, AL

Re: OT: Somewhat: PC wake-up program?

Post by roussell »

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

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
Terry
Steve Horn
HouseBot Guru
Posts: 755
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: OT: Somewhat: PC wake-up program?

Post by Steve Horn »

Thanks Terry, I'll try it once the Christmas dust settles.
Steve
Steve Horn
HouseBot Guru
Posts: 755
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: OT: Somewhat: PC wake-up program?

Post by Steve Horn »

Interesting. Works like a champ :D 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
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Re: OT: Somewhat: PC wake-up program?

Post by Osler »

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
Steve Horn
HouseBot Guru
Posts: 755
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: OT: Somewhat: PC wake-up program?

Post by Steve Horn »

Over my head :oops: 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
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Re: OT: Somewhat: PC wake-up program?

Post by Osler »

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
Steve Horn
HouseBot Guru
Posts: 755
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: OT: Somewhat: PC wake-up program?

Post by Steve Horn »

"I see!" said the blind man. I'll try it tonight. Thanks to you both for the help.
Steve
Steve Horn
HouseBot Guru
Posts: 755
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: OT: Somewhat: PC wake-up program?

Post by Steve Horn »

Works great! Thanks for the help and cscript lesson; I learned something new - never too old. :D
Steve
Post Reply