Awaking computer from a batch file!

Discussion in 'Acronis True Image Product Line' started by babac, May 27, 2008.

Thread Status:
Not open for further replies.
  1. babac

    babac Registered Member

    Joined:
    Sep 16, 2006
    Posts:
    372
    Location:
    Montr?al,Qc.Ca
    Hi everyone,
    I would like to create a batch file to awake my computer from standy and/or hibernate, before running a full backupand some other miscellaneous tasks.

    I went on Google but could not find the exact comand lines to be used.
    Please help.
    Thank you.
     
  2. Acronis Support

    Acronis Support Acronis Support Staff

    Joined:
    Apr 28, 2004
    Posts:
    25,885
    Hello babac,

    Thank you for choosing Acronis Disk Backup Software.

    We are sorry for delayed response.

    Please notice that batch files lack functionality to wake up a computer under Windows environment. It has to be performed via Windows services (for example, Windows scheduler), which can then also run the batch file, if needed.

    Thank you.
    --
    Marat Setdikov
     
  3. oldtimercurt

    oldtimercurt Registered Member

    Joined:
    Jul 5, 2007
    Posts:
    37
    I use a program called wosb (wakeup on standby) which brings my xp computer out of hibernation then executes a couple bat files to actually do the backup. Been working fine for me TI-9 home. You can get the program here http://www.dennisbabkin.com/php/download.php?what=WOSB
     
  4. babac

    babac Registered Member

    Joined:
    Sep 16, 2006
    Posts:
    372
    Location:
    Montr?al,Qc.Ca
    Hello to both of you,
    This is something I was aware of.I'm looking for the exact command lines to write in my batch file(to be run by the Windows Scheduler)
    I do have this program.
    I'm looking for the command lines to be written in a batch file (to be run by the Windows Scheduler).
    I think I repeat myself!:ninja:
     
  5. paracanary

    paracanary Registered Member

    Joined:
    Aug 21, 2007
    Posts:
    12
    I would suggest you use the command shutdown /f /r and run it from windows task scheduler before any Acronis sheduled backups. It is included in Vista and found at c:/windows. This command does a unattended windows restart. After reboot, this can be followed by a timed Acronis schedule. I have found that Acronis backup is much more reliable after a reboot. I run this unattended at night and it has been bullet proof.
     
  6. babac

    babac Registered Member

    Joined:
    Sep 16, 2006
    Posts:
    372
    Location:
    Montr?al,Qc.Ca
    Hi paracanary,
    Do you really believe that this command could be launched when the computer hibernates?
     
  7. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    8,639
    Location:
    NSW, Australia
    babac,

    Does your BIOS support "Auto Power On?" That could be an alternative.
     
  8. babac

    babac Registered Member

    Joined:
    Sep 16, 2006
    Posts:
    372
    Location:
    Montr?al,Qc.Ca
    Hi Brian,
    I think so.
    What do you mean by ''this could be an alternative''.
     
  9. Acronis Support

    Acronis Support Acronis Support Staff

    Joined:
    Apr 28, 2004
    Posts:
    25,885
    Hello babac,

    We are sorry for delayed response.

    I'm afraid I don't exactly understand, what are you trying to achieve. Could you please describe the intended behavior of the setup you have in mind step by step? It would be something like this:

    1. Computer is in sleep state;
    2. Computer wakes up at a scheduled time;
    3. A batch file runs and performs some actions (a backup process, for example).

    Thank you.
    --
    Marat Setdikov
     
  10. babac

    babac Registered Member

    Joined:
    Sep 16, 2006
    Posts:
    372
    Location:
    Montr?al,Qc.Ca
    Hello Marat,
    What I want to do is exactly what you say in your example.

    I would like to automate the first two steps through a .bat file, if it's possible.
    Therefore, I just need the command lines to achieve this.
    Thank you for your interest.
     
  11. paracanary

    paracanary Registered Member

    Joined:
    Aug 21, 2007
    Posts:
    12
    This is part of windows task scheduler which wakes the computer up for scheduled tasks. If you are missing this you should contact Microsoft.

    [​IMG]
     

    Attached Files:

  12. babac

    babac Registered Member

    Joined:
    Sep 16, 2006
    Posts:
    372
    Location:
    Montr?al,Qc.Ca
    Hi para...,
    This has nothing to do with my question.
    I'm not looking for a software but command lines to be written in a .bat file.(if I may repeat myself).
     
  13. paracanary

    paracanary Registered Member

    Joined:
    Aug 21, 2007
    Posts:
    12
    run shutdown command in a bat file and use task scheduler to run the bat file which will wake the computer up if it is asleep
     
  14. babac

    babac Registered Member

    Joined:
    Sep 16, 2006
    Posts:
    372
    Location:
    Montr?al,Qc.Ca
    It's exactly what I want to do since the very beginning.You have just to tell me what are the command lines to be used to wake up my computer with a bat file in the Windows Scheduler.So far, it seems to be easier to say than to do.
    That's the essence of my question since day one.
    Thank you.
     
  15. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    Windows Task Scheduler is what wakes the computer up so it can run the batch file. The batch file can't wake up the computer itself. The batch file can't even be run until the computer is already awake.

    What Brian was referring to in Post #7 was if the computer's BIOS has an option to set a time for the computer to turn on. Some computers have that setting. If yours does, you could set it to turn on at a specific time and then any scheduled task could run. However, that's really not any different than letting Task Scheduler wake up the computer (except that the BIOS can "wake" the computer from a non-sleeping state).

    It sounds like maybe you are wanting two different batch files. One that will put the computer to sleep and one that will run from Task Scheduler after Task Scheduler wakes up the computer. Is that right?

    For the shutdown command, unless I'm missing something, I only see options to shutdown, restart or hibernate. Why do you need the batch file to put the computer to sleep or will hibernate work?
     
  16. shieber

    shieber Registered Member

    Joined:
    Oct 27, 2004
    Posts:
    3,710
    This command should put a PC into suspend/sleep:


    %windir%\system32\rundll32.exe PowrProf.dll, SetSuspendState


    The type of suspend state should depend on how you have it set in the BIOS, S1, S2,S3, etc.
     
  17. babac

    babac Registered Member

    Joined:
    Sep 16, 2006
    Posts:
    372
    Location:
    Montr?al,Qc.Ca
    Hi,
    It's exactly what I want.
    I know how to do the bat file to put my computer to sleep(as per Shieber's way) but I'm still awaiting an answer for the computer to wake up with a similar command.(if I may repeat myself once again).

    After all, may be it's not feasible as I have received more questions than answers about that ,so far.
    Thank you.
     
  18. shieber

    shieber Registered Member

    Joined:
    Oct 27, 2004
    Posts:
    3,710
    I thihnk you're trying to keep sharp corners on a circle. Once the computer is awake, you can run a command but not before. You need the Windows Task Scheduler to wake the processor to full use and run a command. Or, you need to write a program that does the same thing as Windows Task Scheduler; Raxco has done that for it disk utilities but few others have.
     
  19. babac

    babac Registered Member

    Joined:
    Sep 16, 2006
    Posts:
    372
    Location:
    Montr?al,Qc.Ca
    Hi Shieber,
    Let's come back to my question:
    You seem to say that if I run a bat file through the Windows scheduler,it will wake up my computer from hibernation.
    I already tried it and the computer remained in hibernation.
     
  20. laserfan

    laserfan Registered Member

    Joined:
    Jan 19, 2005
    Posts:
    117
    You don't NEED to "create a batch file to awake [your] computer"! Windows Task Scheduler will do that! Then have it execute whatever you want.
     
  21. babac

    babac Registered Member

    Joined:
    Sep 16, 2006
    Posts:
    372
    Location:
    Montr?al,Qc.Ca
    Hi,
    I already tried to launch a Windows Scheduled Task from either hibernation or standby and my computer won't wake up.
     
  22. TgFriday

    TgFriday Registered Member

    Joined:
    Oct 21, 2005
    Posts:
    16
    As #3 post , You may use wosb.exe to wake up ur computer in standby mode:
    In a batch file have a line:
    D:\WOSBFolder\wosb.exe /run /systray /ami time="01:00:00 PM" file="YourOwnWakeupBatch.Bat" weekdays=62

    After run this line, you may set computer to standby/sleep, your computer will wakeup at 1:00PM Mon-Fri. and automatically run YourOwnWakeupBatch.Bat.
    (you may modify the arguments according to wosb.exe /?)

    Good luck.
     
Thread Status:
Not open for further replies.