View Single Post
  #18  
Old 01-23-2007, 01:00 PM
MarkUK MarkUK is offline
Registered User
 
Join Date: Jan 2007
Posts: 1
My Method for what it's worth

I have a pre-script and post-script which run an automator action:

/Users/mark/SaveBackupIcon.app/Contents/MacOS/SaveBackupIcon
&
/Users/mark/SetBackupIcon.app/Contents/MacOS/SetBackupIcon


I did this for flexibility, automator can do applescript, shellscript etc etc.
Then the save automator action just runs a shellscript to save the icon to my /ICONS directory:

cp '/Volumes/volume/.VolumeIcon.icns' '/ICONS/volume.VolumeIcon.icns'
/Developer/Tools/setfile -a V /ICONS/*.icns


Then my set automator action to put it back runs the following script:

cp '/ICONS/volume.VolumeIcon.icns' '/Volumes/volume/.VolumeIcon.icns'
chown mark:admin '/Volumes/volume/.VolumeIcon.icns'
/Developer/Tools/SetFile -a C '/Volumes/volumes'


I then do a 'Get Specified Finder Items' and that contains the volume whose icon is about to be restored. Pass that into an applescript action:

on run {input, parameters}
tell application "Finder" to update input
return input
end run


Maybe it's of interest to someone, maybe not!
Reply With Quote