Stopping & Unloading Growl w/AppleScript

I posted this in the Google Growl Discussion Group, but maybe someone here can give me a hand.

Have an older Mac that was running 10.4. Since it was already a bit on
the slow side I didnt want to bog it down with extra process running
in the background when not necessary. I use Growl to notify me after a
backup has run.

System prefs for Growl are set not to run at start up and no Growl in
menu.

I wrote two small AppleScripts, the first would run before the backup
job and start Growl. The second would run after the backup and stop
Growl (it would also change some of the Growl prefs that get set “on
their own” when Growl starts, back to OFF).

This has all been working great for a long time, but recently I had to
bite the bullet and upgrade the OS to 10.5 to get another app to run
on the system. The upgrade has caused a performance hit to the system
and now I really dont want extra stuff running in the background.

One of the side effects of the OS upgrade is that the script to
disable Growl is not working correctly. After the backup the scrip
executes and Growl is unloaded. If I look at the prefs they are reset
correctly by the script. The problem is when I reboot, Growl reappears
in the menu and the pref not to show is rechecked (it was unchecked
before reboot).

If I uncheck the pref to show in menu using the regular pref GUI and
reboot it works correctly and does not show on next boot. If I do it
through code even though the pref is unchecked and the icon is removed
from the menu after a reboot it is checked and shows.

I dont think it is actually the setting in the pref file that is
causing the problem because if I change the setting through code and
then replace the com.growl.growlhelper app.plist file with a copy that
was changed through the GUI the problem still occurs. Growl must be
looking at something else when it restarts that I need to change.

I see several posts about starting/stopping Growl from a command line
using growlctl but this doesnt really work for me. I am using latest
version of Growl.

Any thoughts why I am now having this problem after upgrade and what
Growl is looking at if not the main pref file?

----------------   AppleScript  ------------

-- Before Backup

-- Start Growl
do shell script "defaults write com.Growl.GrowlHelperApp GrowlEnabled " & "-bool True"
tell application "GrowlHelperApp" to activate
tell application "GrowlMenu" to activate

-- After Backup

-- Stop Growl
tell application "GrowlHelperApp" to quit
tell application "GrowlMenu" to quit
delay 2
do shell script "defaults write com.Growl.GrowlHelperApp GrowlEnabled " & "-bool False"
do shell script "defaults write com.Growl.GrowlHelperApp GrowlMenuExtra " & "-bool False"
do shell script "defaults write com.Growl.GrowlHelperApp StickyWhenAway " & "-bool False"

Figured it out. For some reason after the OS upgrade Growl adds itself to the login items whenever it is run. I just added some more code to remove it after the backu and everything is working fine now. Strange that it didnt do it with the old OS though.

Another way you could do this is by bypassing growl entirely, using your own notifications.