-
May 8th, 2024, 06:33 AM
#1
Thread Starter
PowerPoster
Lid Problem
Oh !
I thought I'd fixed the problem with the non starting of the applications in my startup folder. (My previous thread).
Yes they work when I do a start or restart, but not when the laptop wakes up from sleep or hibernation.
Poppa
Along with the sunshine there has to be a little rain sometime.
-
May 8th, 2024, 07:09 AM
#2
Re: Lid Problem
https://superuser.com/questions/1662...s-task-on-wake
Schedule a task to be executed on "Wake Up"-Event, executing a bat-file running your Programs in the StartUp-Folder.
That said: Are those Programs a "onetime-Run" Programs, or are they like "services"?
because if they are like services (running as long the computer is on), they should still be "running" after wake-up
Last edited by Zvoni; Tomorrow at 31:69 PM.
----------------------------------------------------------------------------------------
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------------------
People call me crazy because i'm jumping out of perfectly fine airplanes.
---------------------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad
-
May 8th, 2024, 09:09 AM
#3
Thread Starter
PowerPoster
Re: Lid Problem
Thanks Zvoni,
Two are 'Service' type app's (single instance, so can't be started twice) and two are 'Run once and stop'. The 'Service' types do continue running after a wake up, the others need to run at wake up as well but don't. All app's run at start and restart.
.
Making a .bat file is easy enough I used to do that quite often, but I don't remember how to start an application using one. 
This version of Windows 10 seems to be lacking a lot of stuff I expect to be there, including the ability to schedule a task.
App's in the Startup folder should run at wake up too, they always have previously in Windows, including Windows 10.
I think Microsoft are trying to force us to use Windows 11. I suspect I'd find similar problems in that too.
The annoying thing is that we bought a much cheaper Windows 10 laptop for my wife at the same time and everything works as expected on that one.
Poppa
Along with the sunshine there has to be a little rain sometime.
-
May 8th, 2024, 11:01 AM
#4
Re: Lid Problem
To run a program at sleep or hibernate resume, use Task Scheduler. For each program you want to create a task that executes that program when the required trigger occurs. For an example for resuming from hibernate see:
https://learn.microsoft.com/en-us/an...r-comes-out-of
Any event that occurs in the system log can be used for a trigger.
All advice is offered in good faith only. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
May 9th, 2024, 05:10 AM
#5
Thread Starter
PowerPoster
Re: Lid Problem
This version of Windows 10 does not have a Task Scheduler !
I'm currently writing a new version of the application to incorporate the extra commands which are ignored in the Startup folder.
Poppa
Along with the sunshine there has to be a little rain sometime.
-
May 9th, 2024, 09:59 AM
#6
-
May 9th, 2024, 10:33 AM
#7
Re: Lid Problem
What version of Windows 10 are you using?
To open the task Scheduler you should be able to
Press Windows key + R at the same time. Then, type taskschd.msc
All advice is offered in good faith only. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
May 9th, 2024, 12:12 PM
#8
Thread Starter
PowerPoster
Re: Lid Problem
Thanks 2kaud,
That was very useful and seems to work, I don't actually have time to try using it at the moment, but it does pull up the scheduler.
Didn't find that anywhere else on line.
Poppa
Along with the sunshine there has to be a little rain sometime.
-
May 12th, 2024, 11:38 PM
#9
Re: Lid Problem
Since this is a programming forum and all, you can write your own program to do things when the lid opens or closes. You can monitor it using the RegisterPowerSettingNotification API with GUID_LIDSWITCH_STATE_CHANGE.
I have a twinBASIC sample of how to use this API on GitHub. (tB is VB6 backwards compatible, if you haven't been following the classic VB forum).
https://github.com/fafalone/clsPresenceMon
-
May 14th, 2024, 04:54 PM
#10
Thread Starter
PowerPoster
Re: Lid Problem
I've got rid of the lid problem with the new lapyop... I've dumped the laptop.
Pop.
Along with the sunshine there has to be a little rain sometime.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|