0
I'm setting up a backup script for a client that will be scheduled to run once a month to backup his 200GB iTunes directory to his NAS. It's compiled using some defined parameters and ROBOCOPY %_source% %_dest% %_what% %_options%
. How can I add something to the start of that script to quit all open applications prior to the Robocopy task?
I could use taskkill.exe but I'm concerned that might damage some iTunes files if it's running at the time. Is there a clean way to quit everything?
I'm not very good with vbs. When I try your suggestion, I get this error: http://i.imgur.com/EwhLBab.jpg
– Reece – 2014-03-17T22:21:37.450Please post your current vbs file and also which windows are you currently running. – niteshadow – 2014-03-18T02:15:45.390
Also since you are making this for a different person would it be possible to send them a vbs file with just the first block of code and see if it works for them? – niteshadow – 2014-03-18T02:43:53.897
I've just created a .vbs file on my desktop with the contents
Set objiTunes = CreateObject("iTunes.Application") objiTunes.quit
CreateObject("WScript.Shell").Run("""C:\BACKUP-SCRIPTS\3d-FileSync.bat""")
. I'm using Windows 7 64-bit. And 64-bit iTunes. UAC is disabled. – Reece – 2014-03-18T03:21:50.840Alright I'm using windows 8 so things might be slightly different, but I've managed to duplicate the error on my system. It seems to happen when the application doesn't exist and after googling it seems like something didn't register correctly when itunes was installed and a repair install might fix it, but like I mentioned before since you won't be using this script you should send the objitunes.quit block to your client and see if it works for them. – niteshadow – 2014-03-18T04:06:49.390
Also I should mention that if itunes is already closed this script will open and then close it. – niteshadow – 2014-03-18T04:53:20.853