Re: Associating files in Packages
I tried changing the lsregister command to lsregister -kill -r -all local,system,user On 30/05/2014 10:19, Matthias Schroeder wrote: Hi, On 05/30/2014 10:58 AM, James Pritchard wrote: Has anyone had experience associating a file type during an install? I have a script as shown below: #!/bin/sh defaults write com.apple.LaunchServices LSHandlers -array-add '{ LSHandlerContentType = "net.company.software.file"; LSHandlerRoleAll = "net.company.software.app"; }' -kill -r -domain local -domain system -domain user Seems the syntax was changed sometimes in the past? Matthias When I run this script from Terminal it works fine but when I add it to my Packages installer. The second part of the script doesn't seem to run. The file associations aren't changed until I restart the computer. Does anyone know what might be happening? Thanks, James _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: This email sent to matthias.schroder@cern.ch _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: This email sent to james@emnetsoftware.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com and again I get the same issue, that it works in terminal but not as part of the install. /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister Are you sure the '-domain X' is correct? I have the impresion that 'domain' is not an option, but an optional argument. So you just use 'local' instead of '-domain local'. https://lists.apple.com/mailman/options/installer-dev/matthias.schroder%40ce... https://lists.apple.com/mailman/options/installer-dev/james%40emnetsoftware....
participants (1)
-
James Pritchard