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.

Dani AI

Generated

glnz's goal — run a short batch that refreshes Wake‑on‑Ring settings just before Windows XP goes into Standby — is sensible because many Conexant "winmodems" and ACPI stacks forget wake settings after a while. 's Task Scheduler idea is the simplest practical approach, while 's "disable standby" is a blunt but effective fallback.

A reliable, low-effort solution: schedule the batch to run repeatedly while the machine is awake so the last run happens shortly before sleep. In Windows XP: Control Panel → Scheduled Tasks → Add Scheduled Task → point to the batch file → choose a schedule (Daily) → use the Advanced options to set "Repeat task" every N minutes (5–30) for a duration of 24 hours. Configure the task to run under an administrative account and store its password so it can run even without an interactive logon. Make sure the task is not set to start only when the computer is idle. If the system sleeps after 10 idle minutes, a 2–5 minute repeat interval gives a good chance the batch will execute immediately before standby.

If truly "just before suspend" behavior is required, a batch file alone cannot be guaranteed that hook. Windows delivers pre‑suspend notifications only to running applications/services (WM_POWERBROADCAST / PBT_APMSUSPEND). The robust fix is a small resident program or service (AutoIt/AutoHotkey, a tiny compiled helper) that registers for power events and spawns the batch when a suspend is imminent.

Troubleshooting notes: verify modem driver and Device Manager power options (Modem → Properties → Power Management) for any "Allow this device to wake the computer" or "Wake on ring" setting; update the Conexant driver; check BIOS/ACPI options for modem/PCI wake; test with the PC awake and an incoming ring. If the modem hardware/driver cannot reliably wake the machine, disabling standby or using an external/modem-based fax service are practical alternatives.

Recommended Answers

All 4 Replies

Create a Scheduled task in windows Task Scheduler. Make it so that it runs the program (in your case the batch file) just before standby or about every 30 minutes...

Thanks, add reps if it worked for you!

Dear C~O: How do I set it to run "just before standby"? Is there such a setting in Scheduled Tasks? Thanks.

Well what you would do is go check the time when the computer goes in standby mode (aka goes to sleep). This should be under power options. Record the time. For example, say your computer is set to go to sleep (standby) after 10 minutes you can set the tigger in task scheduler to run the program every 5 minutes.

why not just disable standby,
I owned a computer for about 12 yrs now and have never seen the need to use standby mode ,actually disable it on ever computer i own or have owned ,and most of the ones i fix/build for others ,just don't see the point ,i have never had a computer of mine die because it was on to much ,they usually run from morning to night .is it just to save money on your power/hydro bill

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.