New
#1
Batch File Hangs. How Can I Effectively End It?
My machine is on v1909 (OS Build 18363.535).
I run a batch file each night to close my Outlook process in preparation for nightly backup. It is, in fact, a batch file located here: Closing Outlook via a (scheduled) script - HowTo-Outlook. The specific script I am running is closeoutlookfailsafe.vbs, and I execute it as a cscript out of the batch file.
It does execute what it is supposed to do, which is closing down Outlook, but then the CMD window hangs open and, within Task Scheduler, the process status maintains as "Running" indefinitely, until the machine shuts down after executing the backup process.
I've been looking around for a way to gracefully end the batch process in such a way that the CMD window closes and the status resets to "Ready", but I am coming up dry. To be clear, the exact language in the batch file is:
cscript.exe "C:\Users\[name]\Documents\Outlook Files\Close Outlook Scheduled Task Files\CloseOutlookFailsafe.vbs"
Does anyone have any feel as to whether I can accomplish what I am looking to do here?