Outlook backup - pre/post commands
Have just upgraded (?!) and noticed the loss of mail backup so am trying to implement something using the pre/post backup commands.
I can stop Outlook okay but starting it again in a batch file will do so BUT when testing Acronis will sit their waiting until Outlook is closed then it continues. When I tried this with a live backup the backup worked but then just hung until stopped manually.
Any thoughts or experiences?

- Accedi per poter commentare

hi Sergey, thanks for your response, I've got it sorted now.
The stop/pre command routine is this .vbs
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'Outlook.exe'")WScript.Sleep 30000
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'Outlook.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
and then after much playing about the post/start routine is this .vbs
Dim WshShell
Set WshShell=WScript.CreateObject("WScript.Shell")
Dim zcommand
zcommand="outlookcommand.bat"
WshShell.Run zcommand
If Err <> 0 then
Err.Clear
Set ObjOL= CreateObject("Outlook.Application")
End If
and outlookcommand.bat is
Start "" "C:\Program Files\Microsoft Office 15\root\office15\outlook.exe"
exit
hope this helps someone else. It's probably not the tidiest of code but it works for me :)
- Accedi per poter commentare

actually, I tell a lie. The scripts work when you test them with Acronis. Outlook starts okay. When doing an actual backup it doesn't. As Acronis thought the backup finished correctly I will have to change my log notification settings and check later.
- Accedi per poter commentare

Okay Sergey. My startup script works perfectly when you use Test Command in the Post-Command screen. Screen attached. Outlook opens fine.
When a scheduled backup runs with this script then Outlook does not start.
My log is
1 Information 24/09/2014 15:07:45 Backup reserve copy attributes: format tib; need_reserve_backup_copy false;
2 Information 24/09/2014 15:07:45 Operation Outlook started manually.
3 Information 24/09/2014 15:07:45 Operation description: Stage Description.
4 Information 24/09/2014 15:08:02 Backup reserve copy attributes: format tib; need_reserve_backup_copy false;
5 Information 24/09/2014 15:08:02 Operation: backup
6 Information 24/09/2014 15:08:02 Priority changed to Low.
7 Information 24/09/2014 15:08:32 Child process has exited with code '0'.
8 Information 24/09/2014 15:08:32 Execution of user command succeeded: C:/Users/Barry/Desktop/closeoutlookscripts/CloseOutlookVerifyFailsafe.vbs
9 Information 24/09/2014 15:09:15 Create Backup Archive From: C:\Users\Barry\AppData\Local\Microsoft\Outlook\
To file: "Outlook_full_b1_s1_v1.tib" Compression: Normal Exclude: System files
10 Information 24/09/2014 15:09:16 Writing full version to file: Outlook_full_b1_s1_v1-3.tib
11 Information 24/09/2014 15:11:12 The following backups have been successfully created: "\\NASDDEC8C\Public\@@Acronis Backups\email backups 2015\Outlook_full_b1_s1_v1-3.tib"
12 Information 24/09/2014 15:11:15 Starting user command: C:/Users/Barry/Desktop/closeoutlookscripts/startoutlook.vbs
13 Information 24/09/2014 15:11:15 Operation has succeeded.
Allegato | Dimensione |
---|---|
206576-115420.jpg | 42.26 KB |
- Accedi per poter commentare

Sergey Britvin wrote:Hello Barry,
thank you for your post.
Could you please provide the log of the backup operation and the command (or the batch file) used for stopping and starting Outlook?
Thank you in advance for cooperation.
Kind regards,
info provided, is someone going to look at this potential bug?
- Accedi per poter commentare