Application won't close with AppleScript

Hi all,

I’ve created a script to install Microsoft Office 2011. This runs fine but at the end of the installation Microsoft AutoUpdate pops up asking if you want to install the latest updates.

I’ve also created scripts to install these updates outside Microsoft AutoUpdate so at the bottom of my script I passed the command

tell application "Microsoft AutoUpdate" to quit

. I have tried putting this in try blocks also. Sadly neither method works… It appears you can’t pass commands to Microsoft AutoUpdate. AppleScript reports no errors either.

My question is, how would I pass the Terminal command to kill the PID through AppleScript or is there another way around this issue?

Thanks

Will

Look here.

Remove the -9 from the terminal command. Also Like I mentioned in the post alastor is referring to this isn’t the way a Mac OS X process should quit.

Thank you for the replies. I understand that quitting an application this way isn’t how it should be closed but the problems it’s causing me leaving it open I’m almost forced to use it…

I have scripts that restart the system and continue on launch but Microsoft AutoUpdate prevents a restart.

Out of interest, what factor does the -9 do in the code?

The option -9 brutally kills to process, the kernel removes the process from the system. Without the -9 the software still receives a signal and quit by itself even if it fails in Mac OS X because this is process level and not application level