Windows 7 Can you open a file automatically when coming out of sleep mode?

mwideman

New Member
Joined
Oct 2, 2012
Messages
2
Windows 7 Startup folder allows you to open a file when starting the computer, but I seldom shut off my computer. Instead, I would like a file to open every time I put in the password to bring it out of sleep mode. Is that possible?
 


Solution
Right click computer and choose Manage.. leave it open
put your computer to sleep
Wake it up

Go to Event Viewer in the management window you have open
Windows Logs / System scroll down the list a few to EventID 1 'Power TroubleShooter The system has resumed from sleep.
You can use this for a trigger on Task Scheduler. ....

OR
Open task scheduler there
Click task scheduler library / then Right Click it , and Create Task...
Triggers ... New .... On Workstation Unlock.
think you figure out the rest. Open a .txt file or pop a message box.. whatever.
Can't find anything on the web about it - but I suspect you can schedule a task for that.
Then set it to run in, say 5 minutes. Then select for it to run automatically if the time is missed.

But then there's the problem of getting it to restart. If you leave it as is, it'll run every 5 minutes.
If you tell it to stop, then I don't know how to get it to restart prior to shutting down (although you could program another problem to start the task immediately before it sleeps (I think I've seen that function in SyncBackSE).

Good luck!
 


Right click computer and choose Manage.. leave it open
put your computer to sleep
Wake it up

Go to Event Viewer in the management window you have open
Windows Logs / System scroll down the list a few to EventID 1 'Power TroubleShooter The system has resumed from sleep.
You can use this for a trigger on Task Scheduler. ....

OR
Open task scheduler there
Click task scheduler library / then Right Click it , and Create Task...
Triggers ... New .... On Workstation Unlock.
think you figure out the rest. Open a .txt file or pop a message box.. whatever.
 


Solution
Right click computer and choose Manage.. leave it open
put your computer to sleep
Wake it up

Go to Event Viewer in the management window you have open
Windows Logs / System scroll down the list a few to EventID 1 'Power TroubleShooter The system has resumed from sleep.
You can use this for a trigger on Task Scheduler. ....

OR
Open task scheduler there
Click task scheduler library / then Right Click it , and Create Task...
Triggers ... New .... On Workstation Unlock.
think you figure out the rest. Open a .txt file or pop a message box.. whatever.

Great answer. I've seen this workaround posted before:


[TD="class: votecell"] You can tick the “Run task as soon as possible after a scheduled start is missed” checkbox on the Settings tab for the task. That's for tasks at least that are scheduled regularly and fail to start due to sleep/hibernate/shutdown. There doesn't seem to be a trigger "On waking from sleep", but you can probably use the “On Event” trigger. The interesting events seem to be from “Kernel-Power” and “Power-Troubleshooter”. System sleep generates an event from Kernel-Power with event ID 42. Wakeup is an event from Power-Troubleshooter with event ID 1.
[/TD]
[TD="class: answercell"][/TD]
 


Back
Top