Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: close all windows shutdown
So what do you want to do there? Add some code to see ifthe FileOpen window is open, then send that an Escape to close then do an Alt-F4.
But then there are millions of programs out there. All with their own ways of not closing.
What if someone opened notepad, then typed a few characters and then did not save. Then the Do you want to save message comes up.
Big problem. I've know a few people who went thru the list of authorized applications at a company and wrote a long script that pretty much knows how to shutdown a long list of applications.
For starters...
list=WinItemizeEx("",@TRUE,@FALSE) count=ItemCount(list,@tab) for xx=1 to count thiswin=ItemExtract(xx,list,@tab) if WinExist(thiswin) If WinIsDOS(thiswin) IntControl(48,thiswin,0,0,0) else WinClose(thiswin) endif endif nextThat should clear out most of them. Then perform a
IntControl(68,0,0,0,0)or
IntControl(68,0,1,0,0)And see if you like either of the results.
Article ID: W14286
Filename: Close all Windows and Shutdown.txt
File Created: 1999:10:26:11:23:04
Last Updated: 1999:10:26:11:23:04