« To All the Violent Anti-Trump Protestors - Knock It Off | Main | Responding to Dennis Prager's Two Questions for Atheists »

How to Safely close Outlook Before Backup

Outlook IconI was working on some batch files to perform nightly backups. One of the issues was safely closing Outlook prior so that I could correctly copy the .pst file. Now, I know I could have used taskkill or .terminate in a vbs file, but those aren't safe ways to do it, and could have corrupted the .pst file. I did find some VB scripts that could close Outlook (such as here - Closing Outlook via a (scheduled) script), which worked fine when running them manually. However, when I tried to run those through Task Scheduler, I wound up getting an error, "ActiveX component can't create object: 'Outlook.Application' ", with an error code of 800A01AD, Microsoft VBScript runtime error. After many hours of researching (I'm not really an expert at this), I'm inclined to believe the comments in this thread, that's it's just unsupported and not possible.

However, I did find a simple workaround, a very simple program titled Close Outlook, available for download from that link. Just use the line 'start closeoutlook.exe' in the batch file, and it will start running in parallel with the rest of the batch file. I run it, then do backups of all my other folders before Outlook, giving Outlook plenty of time to close before it's time to do backup the .pst files. If you've left unsaved open drafts, Close Outlook won't actually close Outlook. You'll get a dialog box in Outlook asking you if you want to save the draft. I actually prefer that, since I don't want to lose those drafts, and missing one night of email backup usually is less troublesome than losing a draft email. But, it means that I had to use another little bit of code to check to see if Outlook was still running, to avoid trying to backup the PST file if it was:

tasklist /FI "IMAGENAME eq outlook.exe" 2>NUL | find /I /N "outlook.exe">NUL
IF "%ERRORLEVEL%"=="0" command

Anyway, after the amount of time I spent trying to figure this out, I thought it might save somebody else some time to know about that Close Outlook program.

Comments

atorvastatin 10mg cheap order atorvastatin 20mg for sale purchase atorvastatin for sale

buy baycip - generic cipro buy augmentin 375mg for sale

oral cipro 1000mg - ciprofloxacin 1000mg over the counter buy augmentin paypal

flagyl 400mg ca - order azithromycin generic azithromycin pills

ciprofloxacin 500mg over the counter - ciplox 500 mg oral brand erythromycin 250mg

buy valtrex without a prescription - cost diltiazem cheap zovirax 400mg

ivermectin 3 mg for humans - where can i buy ciplox oral tetracycline 250mg

order flagyl 400mg generic - purchase amoxicillin generic cost azithromycin

buy generic ampicillin amoxil usa buy amoxicillin pills

order lasix 40mg without prescription - buy tacrolimus capoten cost

order glycomet without prescription - brand duricef 250mg lincocin oral

buy pill generic retrovir - irbesartan 150mg pills allopurinol 300mg price

order clozapine 100mg generic - pepcid usa pepcid canada

seroquel oral - venlafaxine 150mg cost eskalith pill

order clomipramine 50mg generic - oral remeron 15mg cost doxepin 25mg

purchase atarax online - buy amitriptyline 10mg pill cheap endep 10mg

clavulanate without prescription - myambutol 1000mg pill buy generic baycip

buy cleocin for sale - vantin cheap buy chloramphenicol online

cheap zithromax - purchase tetracycline for sale ciprofloxacin 500mg without prescription

stromectol 3 mg tablet - purchase doxycycline for sale buy cheap generic cefaclor

buy albuterol for sale - ventolin buy online buy theophylline medication

medrol ca - fluorometholone usa brand azelastine 10 ml

order glyburide for sale - glipizide 10mg without prescription buy dapagliflozin without prescription

Post a comment


TrackBack

TrackBack URL for this entry:
http://www.jefflewis.net/blog/jlnet-tb.cgi/935

Archives

Selling Out