Removing quarantine as non-admin

I use all my machines as a non-admin (Mac and Windoze), and occasionally, I run into a problem that I can’t work out. This is one…

As everyone here likely knows, newly downloaded/installed programs are flagged as “quarantined”. When one of them is run for the first time, a dialog pops up saying:

I understand why Apple puts things into quarantine, and I know there is a workaround out there by Henrik Nyh (http://henrik.nyh.se/2007/10/lift-the-leopard-download-quarantine) but his solution doesn’t really allow me to discriminate and “release” things as I want to.

As it is, if every time I update an app, I don’t also log in as administrator and “OK” the quarantine removal, I get the “are you sure you want to run it” question every time most apps are launched. In an attempt to remove the quarantine via context menu, I tried to make a finder plugin workflow, but it’s not working.

I pass the result of a “Get selected items” to the following AppleScript:


on run {input, parameters}
	do shell script "xattr -d com.apple.quarantine" & input with administrator privileges
	return input
end run

Everything appears to run. I’m asked for credentials, and I get no errors. If I run it from in Automator, the results show the application I have selected. There is a warning in the log

, but that (whatever it is) doesn’t seem to me to be related.

I had created a short shell script action first, but couldn’t figure out how to be prompted for the admin credentials I also couldn’t get the shell script to work dropped into the Applescript…

do shell script "for f in" & input & ";do;xattr -d com.apple.quarantine \"$f\";done" with administrator privileges 

I’m testing the code with only a single item selected, but I’d love to be able to pass multiple items too.

If I run the “xattr…” line in a terminal window when logged in as admin (via fast user switching), my non-admin account is no longer prompted with the “are you sure” message. Arrrg! Why don’t these scripts work?

Any suggestions would be greatly appreciated

Thanks,
T-

Operating System: Mac OS X (10.5)