Login | |
|
 |
RE: Politely Close all open windows - 6/14/2007 1:53:32 AM
|
|
 |
|
| |
ebgreen
Posts: 5646
Score: 32
Joined: 7/12/2005
Status: offline
|
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: 520
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: 477
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
|
|
| |
|
|
|
 |
RE: Politely Close all open windows - 2/11/2009 8:20:48 AM
|
|
 |
|
| |
robszar
Posts: 183
Score: 0
Joined: 2/27/2005
From:
Status: offline
|
doesn't seem to work with office 2007, bombs here: Set objWord = CreateObject("Word.Application") *UPDATE* It works, my bad
< Message edited by robszar -- 2/12/2009 6:25:57 AM >
|
|
| |
|
|
|
|
|