Results 1 to 15 of 15

Thread: Run on resume     submit to reddit submit to twitter

  1. #1
    Rainbow Dash was here,
    Applejack is a silly filly.

    Join Date
    Jan 2008
    Posts
    1,425
    BG Level
    6

    Run on resume

    Does anyone know how to set something like a batch file to run when a computer resumes from standby/hibernate?

  2. #2
    I Am, Who I Am.
    Join Date
    Nov 2005
    Posts
    15,657
    BG Level
    9
    FFXIV Character
    Trixi Sephyuyx
    FFXIV Server
    Excalibur
    FFXI Server
    Ragnarok

    Run programs on hibernate/suspend and resume! - MP3Car.com

    ?


    I dont recall a DOS/Batch command to have things run on wake (startup yes), and the Scheduled Tasks only has things for go on idle, startup, etc, so this may be the best you get.

  3. #3
    Rainbow Dash was here,
    Applejack is a silly filly.

    Join Date
    Jan 2008
    Posts
    1,425
    BG Level
    6

    I saw that thread when I searched "run on resume" in google, the link is dead and I'm not sure how much I'd trust a 3rd party program.

    There's more talk of it on linux than for windows, I'm not sure why. Maybe people on windows just dont like to automate things.

    Well... maybe we can go about it a different way.

    The reason I want to run a batch file is that if I put my laptop into standby for too long it loses network connectivity, I'm not really sure what was wrong specifically I was too lazy to troubleshoot it that far, I just created a batch file that pretty much restarts all network connections. If anyone knows why that happens or how I can fix that it'd be a more direct solution to this.

    Code:
    ipconfig /renew
    arp -d *
    nbtstat -R
    nbtstat -RR
    ipconfig /flushdns
    ipconfig /registerdns

  4. #4
    I Am, Who I Am.
    Join Date
    Nov 2005
    Posts
    15,657
    BG Level
    9
    FFXIV Character
    Trixi Sephyuyx
    FFXIV Server
    Excalibur
    FFXI Server
    Ragnarok

    I googled the name of the file that was refered to in the dead link and found this Hibernate Trigger
    Seems harmless.

    And standby/hibernate has been know to do that, but check your power settings and look to see if youre not telling them it to disconnect.

  5. #5
    Campaign
    Join Date
    Mar 2006
    Posts
    6,192
    BG Level
    8

    You could just stop using hibernate/standby?

  6. #6
    I Am, Who I Am.
    Join Date
    Nov 2005
    Posts
    15,657
    BG Level
    9
    FFXIV Character
    Trixi Sephyuyx
    FFXIV Server
    Excalibur
    FFXI Server
    Ragnarok

    Yeah, it does suck ass.

  7. #7
    Rainbow Dash was here,
    Applejack is a silly filly.

    Join Date
    Jan 2008
    Posts
    1,425
    BG Level
    6

    Quote Originally Posted by Shuemue View Post
    You could just stop using hibernate/standby?
    Don't want it running but don't want it off.

  8. #8
    Pandemonium
    Join Date
    Jul 2008
    Posts
    4,875
    BG Level
    7
    FFXI Server
    Bismarck

    Quote Originally Posted by #686578 View Post
    Don't want it running but don't want it off.
    Why? You may just want to leave it on, as you'll not save a whole lot of energy. There's not really any advantage to leaving it in hibernate mode, especially if you have to fiddle around with something when you restart it -- you may as well have turned off the computer and be waiting for it to boot up again, then. Any applications you left running could crash or otherwise produce errors upon resume, too.

    Of course, that doesn't answer your initial question, but I'm unaware of any way to run scripts upon resume. Although things can be programmed which send Windows into hibernation under certain circumstances, because of the nature of how hibernation works (saving your state and restoring an identical version of it upon resume).

    That doesn't mean such a thing doesn't exist, but it doesn't sound likely to me. I'd suppose an application would have to be programmed which sensed Windows waking up and restoring the state from your RAM/HDD and then run itself, if that were possible.

  9. #9
    Campaign
    Join Date
    Mar 2006
    Posts
    6,192
    BG Level
    8

    Ghetto solution: turn on speed-step bullshit to save power when idle, use blank black screensaver

  10. #10
    CoP Dynamis
    Join Date
    Jul 2008
    Posts
    293
    BG Level
    4
    FFXI Server
    Ramuh

    If there's a specific reason that he doesn't want it to turn off... like... this:
    Faronics - Home of Deep Freeze and other Intelligent Solutions for ABSOLUTE Control

    Using hibernate would make sense... other than that I'd just turn it off.

    As far as your problem with your net being disabled, like others above posted, check your power settings and make sure that it isn't set to disable ethernet ports or your wireless card (whichever you use) when it goes into standby/hibernate.

  11. #11
    Rainbow Dash was here,
    Applejack is a silly filly.

    Join Date
    Jan 2008
    Posts
    1,425
    BG Level
    6

    Quote Originally Posted by Hosom View Post
    If there's a specific reason that he doesn't want it to turn off... like... this:
    Faronics - Home of Deep Freeze and other Intelligent Solutions for ABSOLUTE Control

    Using hibernate would make sense... other than that I'd just turn it off.

    As far as your problem with your net being disabled, like others above posted, check your power settings and make sure that it isn't set to disable ethernet ports or your wireless card (whichever you use) when it goes into standby/hibernate.
    Firstly, I don't know what that link even is, but thanks for the thought.

    I didn't really want to reply to the power settings thing because well... I'd rather not say since you're just trying to help.

    They're not disabled. It feels more like something forgot I'm connected. Everything is enabled, everything is properly configured, but somewhere along the way it feels like someone forgot they were talking to someone else.

  12. #12
    Pandemonium
    Join Date
    Jul 2008
    Posts
    4,875
    BG Level
    7
    FFXI Server
    Bismarck

    The most interesting notion I've read, courtesy of some serious Googling, is electromagnetic interference caused by the components in the laptop lid interacting with the main internals. Unfortunately, there's no solution for that.

    I don't really have any suggestions. Good luck finding a solution, but I'd recommend just not using hibernate mode.

  13. #13
    Rainbow Dash was here,
    Applejack is a silly filly.

    Join Date
    Jan 2008
    Posts
    1,425
    BG Level
    6

    Just annoying me, it's essentially the same thing as far as pausing network interactions but it's standby not hibernate that I'm using.

  14. #14
    Pandemonium
    Join Date
    Jul 2008
    Posts
    4,875
    BG Level
    7
    FFXI Server
    Bismarck

    Well, you said standby/hibernate in your original post, damn you!

    Anyway, like you said, they're not much different. Hibernate uses the HDD, Standby uses your RAM. I don't know of a solution myself, but I did a little digging regarding Windows' functions when it awakens, and found out that there is a WMI class that notices this occurrence. It's Win32_PowerManagementEvent.

    So, here's the info from the MSDN page I found it on:

    Quote Originally Posted by MSDN

    wscript.exe "C:\Scripts\LaunchAfterStandby.vbs"

    A vbscript example (will loop forever until terminated):

    '--------------------8<----------------------

    Set oShell = CreateObject("WScript.Shell" )

    Set colMonitoredEvents = GetObject("winmgmts:" )._
    ExecNotificationQuery("Select * from Win32_PowerManagementEvent" )

    Do
    Set objLatestEvent = colMonitoredEvents.NextEvent

    Select Case objLatestEvent.EventType

    Case 4
    ' Launch Calc
    oShell.Run "Calc.exe", 1, False
    MsgBox "Entering suspend, Calc started", _
    vbInformation + vbSystemModal, "Suspend"

    Case 7
    ' To run a batch file hidden, you can do like this:
    'oShell.Run """C:\My scripts\mybatch.bat""", 0, False
    ' Launch Notepad
    oShell.Run "Notepad.exe", 1, False
    MsgBox "Resuming from suspend, notepad started", _
    vbInformation + vbSystemModal, "Suspend"

    Case 11
    MsgBox "OEM Event happened, OEMEventCode = " _
    & strLatestEvent.OEMEventCode

    Case 18
    MsgBox "Resume Automatic happened"

    End Select
    Loop
    '--------------------8<----------------------
    The other information in the post is useless, as it points to links which are now broken. If you don't want to use that or the program mentioned previously in this thread -- I'd suppose it probably uses the same event trigger -- you could always get Seno to be your bitch.

  15. #15
    Relic Horn
    Join Date
    Oct 2005
    Posts
    3,132
    BG Level
    7
    FFXI Server
    Unicorn
    WoW Realm
    Shattered Hand

    Chances are very good you can make this work with the task scheduler.

    Right Click My Computer -> Manage -> Task Scheduler. You need to find a log event that happens when your computer wakes up from hibernate and have the task scheduler watch for that, theres probably an associated System -> ACPI message that gets fired when your computer wakes up. To view log events to look for something to hook on to flip to the event viewer just below the task scheduler, then go to windows logs, and look through them for an event that you know occurs on wake from hibernate.

Similar Threads

  1. Could FFXI ever run on the IPad?
    By Toth in forum Tech
    Replies: 26
    Last Post: 2014-01-29, 22:35
  2. Replies: 7
    Last Post: 2011-06-06, 01:49
  3. Will FFXI run on my video card?
    By drg889 in forum Tech
    Replies: 10
    Last Post: 2008-05-28, 16:03
  4. Replies: 3
    Last Post: 2008-03-16, 12:22