RE: Strange behaviour with defaults read in install script
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Thread-index: Acmg2I24nkc7aV+JQuKTCh3CDN5wswAAMIag Thread-topic: Strange behaviour with defaults read in install script Hi Karl, thanks for your response. I'm trying out a few different things to retrieve the default language the machine is running in. What is really strange is that this works ok in a script... defaults read -g AppleLocale But that's not perfect as it's the language I'm trying to retrieve rather than the locale. By getting AppleLanguages, I can get the first language in the list. -----Original Message----- From: Karl Kuehn [mailto:kuehn.karl@gmail.com] Sent: 09 March 2009 17:00 To: Glover,David Cc: Installer-Dev mailing-list Subject: Re: Strange behaviour with defaults read in install script On Mar 9, 2009, at 9:45 AM, Glover,David wrote:
I'm using a preinstall script to read the available languages on the machine as follows;
defaults read -g AppleLanguages
This is fine via a Terminal command, or when running the script by Terminal, but when the script is run by Installer, the following is outputted;
"The domain/default pair of (kCFPreferencesAnyApplication, AppleLanguages) does not exist"
Has anybody come across this unusual behaviour before? Why has Installer decided to start lying to me?
Installer isn't lying to you, it is telling you that for the user that you are running at at that point the list of default languages is not. This is true for any non-GUI user (try running this with sudo for instance). This command is essentially calling: defaults read .GlobalPreferences AppleLanguages And many users do not have a file at ~username/.GlobalPreferences.plist What are you really trying to accomplish here? And are you sure that the installer is the appropriate place for this? -- Karl Kuehn larkost@softhome.net Promethean Limited is a company registered in England and Wales with company number 1308938 and VAT number GB 572 2599 18 ______________________________________________ Promethean Ltd and or associated and or subsidiary companies : The views expressed in this communication may not necessarily be the views held by Promethean Ltd and or associated and or subsidiary companies. This e-mail is for the exclusive use of the addressee(s). Unauthorised disclosure, copying or distribution is prohibited. This e-mail message has been swept for the presence of computer viruses. Promethean Ltd and or associated and or subsidiary companies accepts no liability for any loss resulting from this email transmission. Promethean, Promethean House, Lower Philips Road, Blackburn, Lancashire, BB1 5TH, UK. Please update your records accordingly. Thank you! ***************************************************************** This email has been checked by the e-Sweeper Service ***************************************************************** _______________________________________________ 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: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Glover,David