Can AS enforce application binding/file association?

Ever since I installed CS3 on my work machine, which was also recently upgraded to 10.4, I’m unable to get my file associations to bind to the previous versions of the software through Finder’s “get info”>>“open with”; I’d like to keep the previous version (or the one before that) as the default. I tried resetting the launch services database with a 3rd party tool - this did not remedy the situation.

I’ve observed that I can manually adjust a single file in the Finder, and this sticks, so I started comparing the file properties; the only discernable difference is in the Kind. I’ve been unable to change that property via AS, and was wondering if I’m going about it wrong, or if that is even something I should be targeting. Can AS be used to walk my files to manually edit their associations and/or is there another solution to pursue?

tell application "Finder"
	set isSelected to the selection
	set fileData to {}
	repeat with counterVar in isSelected
		set the end of fileData to counterVar's {kind, creator type, file type}
		--set counterVar's kind to "Adobe® Indesign CS2" --receives error
		set counterVar's properties to {kind:"Adobe® Indesign CS2"} --no error, but ineffectual
	end repeat
	fileData
end tell

Hi Marc,

kind is a read only property, but have you tried to change creator / file type?

Ah, thanks. I must’ve overlooked that bit of info in the dictionary. Yes, I did obtain the creator and file types, but they are the same for the 3 versions of this app. It looks like there may have been changes made to launchservices that don’t permit a global change via Finder to legacy versions, but I can still change one file at a time, manually “ that’s a PITA, though.

Many, perhaps most, application vendors these days keep the same Type/Creator for all versions of their software, Adobe being the most notorious. Aldus and Altsys were the best at this, they changed both with every major release. I can keep FreeHand MX, 8, and 9 on my Mac and FreeHand files will all launch into the appropriate version. :wink:

This is why I had such a horrible time with writing Clorox File Repair and Clorox File Detective…the only way to tell application version in Adobe products is to look inside the file headers and GREP for very specific string sequences. Annoying as heck…shame on Adobe.