Tiscali said:
Hi,
Can I force Outlook to close in a DOS .bat file so I can then invoke the
backup of the .pst database in the same .bat...?
Yes, but two caveats:
1) The tool you use may depend on your version of Windows
2) Unless you take very special measures (keystroke pushing to
answer dialogs) you may have to FORCE the close and this
can damage the (usually recoverable) PST file.
Something like (which I do NOT recommend):
tasklist | findstr /I OUTLOOK.EXE && taskkill /IM outlook.exe
sleep 60
tasklist | findstr /I OUTLOOK.EXE && taskkill /F /IM outlook.exe
First try to close it politely, then force the close.
Above I tried to stay with tools likely to be on your system (you may
need to find a copy of sleep.exe etc.), but these are not all on NT/2000
machines and there are plenty of substitutes in the Reskit or on the
Internet.
--
Herb Martin, MCSE, MVP
Accelerated MCSE
http://www.LearnQuick.Com
[phone number on web site]