Option to choose Yes/no to run a batch file in Scheduler!!

Status
Not open for further replies.

hansraj

In the zone
Friends...I want to run a batch file through the task scheduler. Now this batch file is to hibernate my system in my absence. When I am working on the system I want a prompt to appear for some time which gives me an option of choosing yes/no. Also if yes/no is not given a reply the batch file to hibernate the system should run after specific time period.
Is this possible? If yes, how!!!
 

CA50

Cyborg Agent
Sory i cant help with this but i hav an alternative, go to power option in xp, there is an option to hibernate da pc after a specific time. Note that you hav to enable hibernate.
 
OP
hansraj

hansraj

In the zone
@ca50
thanks a lot for the generous reply. Found an alternate method. This is the code I am using to achieve my solution.


@Echo off
echo .
echo ..
echo ...Close this window or else...
echo ...the system will hibernate in 45 seconds
echo Countdown has already begun!!!
PING -n 45 127.0.0.1>nul
rundll32 powrprof.dll,SetSuspendState


I have written this code and saved it as a hibernate.bat file and its working fine for me. May be this post helps someone else too.
 
Status
Not open for further replies.
Top Bottom