Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 11-29-2009, 03:13 PM   #1
Solid State Member
 
glnz's Avatar
 
Join Date: Nov 2009
Posts: 9
Default How do I make a batch file play automatically just BEFORE the PC goes into Standby?

How do I make a batch file play automatically just BEFORE the PC (WinXPPro SP3) goes into Standby?

Why do I ask? I'm having trouble with Wake on Ring. I want my Conexant modem card ALWAYS to answer my fax line and receive faxes, but it is NOT reliable about waking up when the PC is in standby. Sometimes it does, and sometimes it doesn't and I miss faxes.

So I wrote a very short batch file that has two powercfg command lines that seem to work in reminding the PC and the Conexant modem card that they should Wake on Ring during Standby. How do I get this batch file to play automatically either just before standby or (second-best) every 30 minutes or so when the PC is awake?

Thanks.
__________________

glnz is offline   Reply With Quote
Old 11-30-2009, 05:46 AM   #2
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: How do I make a batch file play automatically just BEFORE the PC goes into Standb

I'm not sure how to execute a program before the machine goes into standby - you can specify scripts to be run at shutdown easily (Start -> run -> gpedit.msc -> computer configuration -> windows settings -> scripts) but, as per the name, those scripts will only execute at shutdown.

Every 30 minutes when the PC is awake is dead easy though. Start -> control panel -> scheduled tasks -> add scheduled task - then just follow the wizard through. Don't worry about entering details of when the schedule should be run at this point though (because you can't tell it to run every 30 minutes here, you have to do it afterwards - silly design flaw if you ask me.) Once the wizard has completed, on the last screen, check "open advanced properties for this task" (or something similar.) Firstly head over to the settings tab and make sure "wake the computer to run this task" is unchecked. Then go to schedule, hit advanced. Uncheck end date, check repeat task, then choose every 30 minutes.

OK out of those boxes and job done
__________________

berry120 is offline   Reply With Quote
Old 08-28-2010, 11:50 AM   #3
Solid State Member
 
glnz's Avatar
 
Join Date: Nov 2009
Posts: 9
Default Re: How do I make a batch file play automatically just BEFORE the PC goes into Standb

Dear berry: Your advice above might be useful for a different problem: My office PC, with WinXPPro SP3 and 2 GB RAM, hangs on shutdown, and I'm fairly sure it's the application GoToMyPC that causes the hang. My office PC has GoToMyPC running so that I can access it from home. Love that program but don't like it causing hangs on shutdown.

So, what script would I write to shut down GoToMyPC first before the rest of the PC shuts down? I've never written a script.

Thanks.
glnz is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 10:45 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0