| piezanno | 3 Posts | |
| wrote on 21.09.20 at 17:26 | | I had this same problem when stream writer opens after a reboot or power fail, I reboot my spare windows pc every night, I didn't know about the startup option to load with previous saved file, so I wrote the following vbs program to close the windows. name your file: filename.vbs and run it from a scheduler task or bat file.
Dim oShell Set oShell = WScript.CreateObject ("WScript.Shell")
'Try to gracefully close streamwriter question window if ( oShell.AppActivate("Question") = True) Then oShell.SendKeys "{ENTER}" End If
'Kill any leftover "Info" windows from streamwriter if they are open
oShell.Run "taskkill /fi ""WINDOWTITLE eq Info""",0,False
'if any leftover "Question" windows from streamwriter kill them oShell.Run "taskkill /fi ""WINDOWTITLE eq Question""",0,False
if running out of task scheduler make sure to run it at the same security level or higher as the task that starts stream writer. |
|
|