home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
General Support
How to run a command on wakeup from hibernation
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="arion_p" data-source="post: 548721" data-attributes="member: 45945"><p>PowerScheduler will call you command both on suspend and on wake up.</p><p>Assuming the command you configure is "c:\example.bat", on suspend it will call:</p><p>[code]c:\example.bat suspend[/code]and on wake up it will call:</p><p>[code]c:\example.bat wakeup[/code]So your batch file should check %1 to see if it is called as a result of a suspend or a wake up, and act accordingly. Something like this:</p><p>[code]if "%1" == "suspend" goto OnSuspend</p><p>if "%1" == "wakeup" goto OnWakeUp</p><p>goto Done</p><p></p><p>:OnSuspend</p><p>... do your suspend stuff ...</p><p>goto Done</p><p></p><p>:OnWakeUp</p><p>... do your wake up stuff ...</p><p>goto Done</p><p></p><p>...</p><p></p><p>:Done[/code]</p></blockquote><p></p>
[QUOTE="arion_p, post: 548721, member: 45945"] PowerScheduler will call you command both on suspend and on wake up. Assuming the command you configure is "c:\example.bat", on suspend it will call: [code]c:\example.bat suspend[/code]and on wake up it will call: [code]c:\example.bat wakeup[/code]So your batch file should check %1 to see if it is called as a result of a suspend or a wake up, and act accordingly. Something like this: [code]if "%1" == "suspend" goto OnSuspend if "%1" == "wakeup" goto OnWakeUp goto Done :OnSuspend ... do your suspend stuff ... goto Done :OnWakeUp ... do your wake up stuff ... goto Done ... :Done[/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
General Support
How to run a command on wakeup from hibernation
Contact us
RSS
Top
Bottom