PDA

View Full Version : Closing outlook via the command line - or something.



Tony
04-11-2011, 11:41 AM
I want to close Outlook before my backup program runs the re-open it when it has finished. The backup program has the facility for pre- and post- run commands, but I don't know what I would use.

Any ideas?

Snorkbox
04-11-2011, 01:03 PM
Which version of Outlook is it?

I use 2007 with an add on to backup and all I do is close Outlok and it backs up.

Speedy Gonzales
04-11-2011, 01:06 PM
Doesnt look like its got an exit/close command (http://office.microsoft.com/en-us/outlook-help/command-line-switches-for-microsoft-office-outlook-2007-HP001218589.aspx)

Tony
04-11-2011, 02:34 PM
It's Outlook 2007. I'm trying to do a general incremental backup, not just Outlook, so I need more than an Outlook addon.

Speedy - I hadn't managed to find anything, which is why I called on the collective wisdom of PF1.

pctek
04-11-2011, 02:39 PM
Batch file?
Schedule immediate close of Outlook.
Run backup prog.

Tony
04-11-2011, 02:45 PM
Batch file?
Schedule immediate close of Outlook.
Run backup prog.Well, there's the problem. How do I automagically close Outlook?

1101
04-11-2011, 03:00 PM
perhaps schedule a restart of the PC, & dont have Outlook auto starting .
shutdown -r

6ix
04-11-2011, 03:19 PM
There are third party processes that work like kill in linux.. I have used one by "beyond logic" before.. I think it was called process.exe

Tony
04-11-2011, 03:33 PM
perhaps schedule a restart of the PC, & dont have Outlook auto starting .
shutdown -rI guess that would work, but it would rather kill the idea of backups working seamlessly in the background...

Alex B
04-11-2011, 03:33 PM
I would avoid using something like pskill, you are likely to end up with a corrupt PST, so would need to be a safe shutdown method rather than forced.

Tony
04-11-2011, 03:34 PM
I would avoid using something like pskill, you are likely to end up with a corrupt PST, so would need to be a safe shutdown method rather than forced.Yes, absolutely right, although I have found that Outlook usually recovers the file OK after a system freeze or whatever.

wainuitech
04-11-2011, 06:47 PM
You could always try whats suggested Here (http://ask-leo.com/how_do_i_automatically_close_a_program_so_that_its _data_can_be_backed_up.html)

OR even a better Idea, get a back up program that doesn't need to close off Outlook to start with.

One of the backup programs I use is Fbackup (http://www.fbackup.com/) -- Never ever had to close Outlook when its doing its backups. It quite happily backs up the complete pst file whether Outlook is open or closed.

Edited: If you need proof -- See attachment -- outlook is open, and fbackup is backing it up to a linux server in the workshop ( arrows / progress down the bottom) Doing it manually as a demo as it was set to auto run earlier.

Tony
04-11-2011, 09:08 PM
That looks like it might do the trick - although there is still the risk of pst file corruption.

You are right about finding a backup prog that doesn't need to close Outlook. I'd been using Genie Backup for years and that uses volume shadow copy to avoid the issue, but it has got very unreliable lately, so I changed to Acronis True Image Home. Unfortunately I didn't think to test that aspect during the evaluation, and now I've paid for it. However it was not vastly expensive so I may still change again. I'll check out Nircmd.

Thanks.