Page 5 of 5 FirstFirst ... 345
Results 41 to 50 of 50

Thread: Can I disable "Delayed Standby" after is has been requested?

  1. #41
    Join Date
    Oct 2006
    Location
    good ol' germany
    Posts
    546
    Quote Originally Posted by keith_leitch View Post
    Is this a file you posted for me? I can't find the one you mean.
    attached to the post i've linked to are 2 zips. in the server one you'll find the au3 skript. another alternative: http://forums.gbpvr.com/showthread.php?t=25751 has the original script i modified for my needs on the first post
    Quote Originally Posted by sub View Post
    Yep, what he said.
    curiosity killed the cat

  2. #42
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    496
    Quote Originally Posted by Mister Slimm View Post
    Entry points (the IsSystemResumeAutomatic bit) are case sensitive. You have to type exactly as I have. This code runs without error:
    Code:
    rundll32 Kernel32.dll, IsSystemResumeAutomatic
    If it sets the return code then I believe the following should perform the echo when the system resume is unattended:
    Code:
    IF ERRORLEVEL 1 THEN ECHO "Spooky, there's no-one here."
    However, as you point out, it is a boolean function and the return code is likely to always be zero. I've written a teensy console app (it still requires .NET 2.0) that sets the return code to the result of this function and so the ERRORLEVEL check should perform correctly. I've tested that it sets the return code but haven't tested whether it does what is expected on an unattended resume. Also note that all power management functions in Windows are notoriously inconsistent and only require the tiniest thing to be different (like tying your shoelaces the opposite way to normal or only giving the cat 3mm of water in their dish) to produce unexpected results. Still, if it helps that'll be great.
    Hi, Slimm. After all the trouble you've gone to, I'm sorry it took so long to test this. I have now run a few tests, and as far as I can tell the app never produces errorlevel 1. I created a batch file that simply runs it and reports the errorlevel, and also set that batch file to wake up the computer as a scheduled task: always errorlevel 0.

  3. #43
    Join Date
    Nov 2005
    Location
    Coventry, England, UK
    Posts
    434
    Quote Originally Posted by keith_leitch View Post
    Hi, Slimm. After all the trouble you've gone to, I'm sorry it took so long to test this. I have now run a few tests, and as far as I can tell the app never produces errorlevel 1. I created a batch file that simply runs it and reports the errorlevel, and also set that batch file to wake up the computer as a scheduled task: always errorlevel 0.
    Odd, but not entirely unexpected; shame.
    Akasa Zen case, AMD Phenom II X3 720, 4.00Gb Ram, Sapphire ATI Radeon 4890, Terratec Terratec Cinergy 2400i Twin Digital Tuner, 1050Gb storage, Windows 7 Home Premium.
    See my blog for releases, HD wallpapers, movie, game and anime reviews and more.

  4. #44
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    496

    Spoke too soon.

    Quote Originally Posted by Mister Slimm View Post
    Odd, but not entirely unexpected; shame.
    My apologies! I must not have had .NET installed on my laptop. I thought that I did.

    With .NET installed, the tiny app works as described (though unreliably, as you predicted). I will use it to determine whether my PC came out of "sleep" automatically, but will also do a secondary check of whether there are 2 minutes or less left before a scheduled recording, and whether it is time for an EPG update.

    Thanks for your programming services!

  5. #45
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    496

    Automatic Resume detection by Slimm works well

    Quote Originally Posted by Mister Slimm View Post
    This code runs without error:
    Code:
    rundll32 Kernel32.dll, IsSystemResumeAutomatic
    If it sets the return code then I believe the following should perform the echo when the system resume is unattended:
    Code:
    IF ERRORLEVEL 1 THEN ECHO "Spooky, there's no-one here."
    Having tested Slimm's tiny app (attached to the original post) for some time now, I am finding that it is actually quite reliable (provided .NET is installed). In all these weeks it has only twice detected a "false manual" resume, and never detected a "false automatic" resume. I recommend this to anyone who wishes to detect, from a batch file, whether their system came on by itself. Thanks again, Slimm!

  6. #46
    Join Date
    Nov 2005
    Location
    Coventry, England, UK
    Posts
    434
    Just discovered that this tells you what woke the computer up.
    Code:
    powercfg -lastwake
    Akasa Zen case, AMD Phenom II X3 720, 4.00Gb Ram, Sapphire ATI Radeon 4890, Terratec Terratec Cinergy 2400i Twin Digital Tuner, 1050Gb storage, Windows 7 Home Premium.
    See my blog for releases, HD wallpapers, movie, game and anime reviews and more.

  7. #47
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    496
    Quote Originally Posted by Mister Slimm View Post
    Just discovered that this tells you what woke the computer up.
    Code:
    powercfg -lastwake
    Hmm...not available on my copy of XP. From the help file:

    Examples:
    POWERCFG /LIST
    POWERCFG /QUERY scheme
    POWERCFG /QUERY
    POWERCFG /CREATE scheme
    POWERCFG /DELETE scheme
    POWERCFG /SETACTIVE scheme
    POWERCFG /CHANGE scheme /monitor-timeout-dc 15
    POWERCFG /CHANGE scheme /monitor-timeout-dc 0
    POWERCFG /HIBERNATE on
    POWERCFG /EXPORT scheme /file file
    POWERCFG /QUERY number /NUMERICAL
    POWERCFG /GLOBALPOWERFLAG on /OPTION BATTERYICON
    POWERCFG /AVAILABLESLEEPSTATES
    POWERCFG /BATTERYALARM low
    POWERCFG /BATTERYALARM critical /ACTIVATE on /LEVEL 6 /ACTION hibernate
    POWERCFG /DEVICEQUERY wake_armed
    POWERCFG /DEVICEENABLEWAKE "Microsoft USB IntelliMouse Explorer"

    After all this time, though, I should reinforce that your IsSystemResumeAutomatic tinapp never fails me. Combining that with GBPVRCLI to watch for recordings, the commandline standby options with SlimmGBPVR, and a daily automatic restart, and my system automation is sweet indeed.

  8. #48
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    496
    Quote Originally Posted by keith_leitch View Post
    After all this time, though, I should reinforce that your IsSystemResumeAutomatic tinapp never fails me. Combining that with GBPVRCLI to watch for recordings, the commandline standby options with SlimmGBPVR, and a daily automatic restart, and my system automation is sweet indeed.
    An odd development: After a year of faithful service, the tinyapp will no longer detect an automatic system resume. It seems to return an error level of 0 regardless of how the system awakes. This happened suddenly; one day it was "always right," and the next day, "always wrong." I can only conclude that a Windows Update has rooted me.

  9. #49
    Join Date
    Nov 2005
    Location
    Coventry, England, UK
    Posts
    434
    Quote Originally Posted by keith_leitch View Post
    An odd development: After a year of faithful service, the tinyapp will no longer detect an automatic system resume. It seems to return an error level of 0 regardless of how the system awakes. This happened suddenly; one day it was "always right," and the next day, "always wrong." I can only conclude that a Windows Update has rooted me.
    Oh dear. It doesn't need to be run as an administrator or something does it? I'm not entirely sure what I can do to debug it. It literally contains a single line of code.
    Akasa Zen case, AMD Phenom II X3 720, 4.00Gb Ram, Sapphire ATI Radeon 4890, Terratec Terratec Cinergy 2400i Twin Digital Tuner, 1050Gb storage, Windows 7 Home Premium.
    See my blog for releases, HD wallpapers, movie, game and anime reviews and more.

  10. #50
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    496
    Quote Originally Posted by Mister Slimm View Post
    Oh dear. It doesn't need to be run as an administrator or something does it? I'm not entirely sure what I can do to debug it. It literally contains a single line of code.
    Oh, well. It had a good run. I will watch over the next few days to see if there is some other factor in play.

    I am running it from the same account as I always have, which has administrator privileges (but is not the administrator account).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •