Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Getting Software Update alerts as a standard user System
I have Mac OS X check for updates daily and automatically download any updates. However, only when I log in as an administrator do I get a dialog box informing of the existence of updates.

I wrote a short AppleScript to take care of the issue. Note that the script does not check for updates itself but relies on OS X's checking it in the background so it requires that the options to check for updates periodically and download updates automatically be checked in the Software Update preference pane.

Create the following script in the AppleScript Editor and save it as an application:
-- A script alerting non-administrator users about available downloaded
-- software updates

set updates_no to do shell script "defaults read /Library/Preferences/com.apple.SoftwareUpdate LastUpdatesAvailable"
if (updates_no > 0) then
  try
    set dialogResult to display dialog updates_no & " software update(s) are avalaible. Launch Software Update?"
    if button returned of dialogResult = "OK" then
      ignoring application responses
        tell application "Software Update" to activate
      end ignoring
    end if
  on error number -128
    -- The user canceled so do nothing
  end try
end if
Please, do not include any new line in the do shell command, otherwise, the script will fail. Add the script application to your standard account's Login Items.

From now on, whenever you login into that account *after* the automatic check downloaded new updates, a dialog bode informing you of the updates and suggesting to run Software Update for you is displayed. Of course, an administrator password is still required by Software Update.

This Script has been tested on Mac OS X 10.7.2 and detected the downloaded iTunes 10.5.3 update.

[crarko adds: I didn't have any updates available to try this with.]
    •    
  • Currently 3.33 / 5
  You rated: 4 / 5 (9 votes cast)
 
[4,983 views]  

Getting Software Update alerts as a standard user | 7 comments | Create New Account
Click here to return to the 'Getting Software Update alerts as a standard user' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
"Standard"
Authored by: SeanAhern on Jan 30, '12 08:09:01AM

I think the title should say "standard", not "stander".



[ Reply to This | # ]
"Stander"
Authored by: gabester on Jan 30, '12 08:18:10AM

Perhaps someone can parse this hint and determine how to best modify the code so that it displays the updates to users who are sitting? I don't like to stand and wait for software updates to be delivered!



[ Reply to This | # ]
"Standard"
Authored by: crarko on Jan 30, '12 04:16:05PM

Ooops. Fixed.



[ Reply to This | # ]
Getting Software Update alerts as a stander user
Authored by: BiL Castine on Jan 30, '12 09:25:32AM
instead of (or in addition to) putting the script in the login items folder, I'd create a launched .plist that runs the script every time /Library/Preferences/com.apple.SoftwareUpdate is modified. that way the standard user wouldn't have to wait until next login to realize there is an update waiting. this is trivial to set up using Lingon.

[ Reply to This | # ]
Getting Software Update alerts as a stander user
Authored by: whshep on Feb 03, '12 12:54:20PM

This must be more than trivial, because I've tried to set this up in Lingon with no success. Please elaborate!



[ Reply to This | # ]
Getting Software Update alerts as a standard user
Authored by: GoboGobo on Feb 01, '12 02:48:54AM

I've done some hacking based on previous comments, and the original de.anderson.sven.updateCheck. The updatecheck method no longer works because softwareupdate can only be run as root, also Growl has been updated, so that didn't work either.

A new fixed version is available here (right-click and save-as)

Place it in ~/Library/LaunchAgents and re-login or enter the following command in the Terminal:

launchctl load ~/Library/LaunchAgents/de.anderson.sven.updateCheck.plist

[ Reply to This | # ]
Getting Software Update alerts as a standard user
Authored by: Gobo on Feb 02, '12 08:29:04AM

Apple was just in time to send out a new update. There was a small bug in the script that prevented it from running, I've uploaded a fixed version to the same URL.



[ Reply to This | # ]