Login | |
|
 |
RE: Politely Close all open windows - 6/14/2007 1:53:32 AM
|
|
 |
|
| |
ebgreen
Posts: 5240
Score: 31
Joined: 7/12/2005
Status: online
|
Very handy. This chunk: If Not LCase(Right(Wscript.FullName, 11)) = "wscript.exe" Then Set objShell = CreateObject("Wscript.Shell") objShell.Run WScript.ScriptFullName , 0, False WScript.quit End If would re-run the script with whatever the default engine is for that user. In my case, the default engine is CSCript. This means that it would essentially just keep killing itself and starting over. Instead then you should probably have it explicitly run itself with WSCript.exe.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Politely Close all open windows - 6/14/2007 5:52:17 AM
|
|
 |
|
| |
Rischip
Posts: 510
Score: 2
Joined: 3/26/2007
Status: offline
|
Yeah my mistake, I posted it before I fixed it. Ok, it's fixed.
< Message edited by Rischip -- 6/14/2007 6:30:11 AM >
_____________________________
Rischip Author of - The Grim Linker
|
|
| |
|
|
|
 |
RE: Politely Close all open windows - 6/15/2007 5:10:57 AM
|
|
 |
|
| |
Fredledingue
Posts: 383
Score: 0
Joined: 5/9/2005
From:
Status: offline
|
Works like a charm! And personaly I like the fact that it doesn't requires WMI so that I can run it on my w98++ machine.
_____________________________
Fred
|
|
| |
|
|
|
|
|