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


Click here to return to the 'Get Safe Downloads List last update time and current version' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Get Safe Downloads List last update time and current version
Authored by: chrischram on Jun 03, '11 11:18:11AM

Nice looking widget. How about adding a "Force Update" button that runs:

sudo /usr/libexec/XProtectUpdater



[ Reply to This | # ]
Get Safe Downloads List last update time and current version
Authored by: joelbruner on Jun 03, '11 02:44:50PM

Well the trick is that it's a sudo command, so there needs to be a way to authenticate via GUI. I can map that command to a button, but then it freezes the widget because there is no user interface to authenticate to. So rather than figure out a way (maybe I could have it spawn a terminal window that is fed the sudo command that then prompts? But that is sort of inelegant for a widget) So, I figure I'll leave that in the hands of Apple, the only apparent way is to force an update is to toggle the setting on and off in the Security prefPane. So for now it'll be a purely informational widget. Thanks of the suggestion though!



[ Reply to This | # ]
Get Safe Downloads List last update time and current version
Authored by: glusk on Jun 07, '11 09:31:14PM

Maybe applescript to authenticate?

osascript -e 'do shell script "sudo /usr/libexec/XProtectUpdater" with administrator privileges'



[ Reply to This | # ]
Get Safe Downloads List last update time and current version
Authored by: everkleer80 on Jun 09, '11 08:19:47AM

I think I recall reading some Apple KB article saying you shouldn't use 'sudo' with 'with administrator privileges' (ie. I think your applescript shell script will work without sudo - though I'm not positive on that.)

Edited on Jun 09, '11 08:20:12AM by everkleer80



[ Reply to This | # ]