Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How can I set a scheduled task to minimize open windows before sleep?


15 Jul 2010   #1

Win7 / XP
 
 
How can I set a scheduled task to minimize open windows before sleep?

I would like to set up a scheduled task that will minimize all open windows when I choose sleep or hibernate from the start menu.

For some reason, if I don't minimize any open windows before entering "sleep" mode, I get screen freezes and video card errors upon awakening. I would just like to have Task Scheduler automatically minimize open windows in case my wife forgets to do so.

The machine is a Toshiba A300 laptop that I've upgraded to Windows 7 32 bit from Vista.

My System SpecsSystem Spec
.

15 Jul 2010   #2

Windows 7
 
 
A workaround?

Try disabling Windows Aero and see if that resolves the issue.

If you want to minimize everything before going to standby... well, maybe you can take the habit of pressing Windowskey+M every time you leave your computer (you can reverse it with Windowskey+M+shift).
My System SpecsSystem Spec
15 Jul 2010   #3

Win7 / XP
 
 

I tried turning off Aero (but will try again). At this point I've tried everything including 3 installs of Windows 7, all sorts of new (and old) video drivers, power settings, and so on. Minimizing windows before sleeping is the only thing that has worked.

The reason I want to automate the windows minimization is that it is my wife's PC and she doesn't always remember to do this. If it were just me, it would not be a problem.

There must be some sort of scheduled task that I could set up to minimize windows whenever sleep or hibernate is invoked.
My System SpecsSystem Spec
.


15 Jul 2010   #4

Win 7 Ultimate 32bit
 
 

This should work....

Code:
Set shell = wscript.CreateObject("Shell.Application")
Shell.MinimizeAll
paste that to a text file and then name it whatever.vbs
Create a task that calls the file,, should work.

Let us know if not, it may need some refining on the commands in the Task itself, to call the vbs file properly. I have not used it in 7, but it works when double clicked


I found this somewhere a long time ago.
I have used it before,, but not in a while. I haven't had a need for it in some time.
My System SpecsSystem Spec
17 Jul 2010   #5

Win7 / XP
 
 

Hi Tepid - script works great - but now was wondering if you or anyone knows how to set it up under task scheduler so that it gets invoked upon sleep. I don't see an obvious task name like "sleep" listed as an option under "triggers", though presumably there are other things that happen before sleep that I could use as a trigger instead.

Thanks much!

Tim
My System SpecsSystem Spec
17 Jul 2010   #6

Windows 7 x64 pro/ Windows 7 x86 Pro/ XP SP3 x86
 
 

If I am not mistaken, windows generates a kernel power event with the ID 42 when entering sleep. So what you can try is, in task scheduler, under triggers, select "On Event", then specify 42.
My System SpecsSystem Spec
17 Jul 2010   #7

Win 7 Ultimate 32bit
 
 

Yeah I might try the Event ID 42

The Log is System
Source is Kernel-Power
Event ID is 42

I would also set the Stop task if it runs longer than 30 min just incase something causes it to run away

or

Under Conditions Tab,, you can try using Idle options.
My System SpecsSystem Spec
17 Jul 2010   #8

Win7 / XP
 
 

Thanks much Tepid & Bill - I will try your suggestions.
My System SpecsSystem Spec
17 Jul 2010   #9

Win7 / XP
 
 

Hmm - doesn't seem to be working. I think the event 42 doesn't happen until it is too late for the task to be executed.
My System SpecsSystem Spec
17 Jul 2010   #10

Win 7 Ultimate 32bit
 
 

Did you try the Idle options under the Conditions Tab?
My System SpecsSystem Spec
Reply

 How can I set a scheduled task to minimize open windows before sleep?




Thread Tools



Similar help and support threads for2: How can I set a scheduled task to minimize open windows before sleep?
Thread Forum
Scheduled Task history indicates task completed successfully but.... Performance & Maintenance
Scheduled Task / Batch Code on Windows Server 2008 R2 SP1 Software
windows 7 scheduled task remote access Network & Sharing
Scheduled task does not run General Discussion
Scheduled task problems Performance & Maintenance
wish I could minimize ALL when multiple windows open in same program General Discussion
Unable to minimize, maximize, or close open windows General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 07:09 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33