site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Mail-followup-to: installer-dev@lists.apple.com, "Perbix, Michael" <PERBIX@lmsd.org> User-agent: Mutt/1.5.10i You can almost do it with the defaults command. From your postinstall script, you can run this command to add the first one: defaults write "$3/Library/Preferences/loginwindow" AutoLaunchedApplicationDictionary -array-add '{Hide = 0; Path = "/Applications/SMART Board Software/SMARTBoardService.app"; }' But the problem is that it will fill the plist with <key>Hide</key> <string>0</string> Instead of what you really want: <key>Hide</key> <false/> It's possible that it'll still work, but I can't say for sure. PlistBuddy will definitely work for you, though. You can do a variation on this process: Create a Plistbuddy command file in your resources directory of your package, called plb-commands (or whatever you like) that contains: (beginning of file - do not include this line) Add :AutoLaunchedApplicationDictionary:0 dict Add :AutoLaunchedApplicationDictionary:0:Hide bool false Add :AutoLaunchedApplicationDictionary:0:Path string "/Applications/SMART Board Software/SMARTBoardService.app" Add :AutoLaunchedApplicationDictionary:0 dict Add :AutoLaunchedApplicationDictionary:0:Hide bool false Add :AutoLaunchedApplicationDictionary:0:Path string "/Applications/SMART Board Software/SMART Board Tools.app" Save Exit (end of file - do not include this line) Then, from your postinstall script of your package, call this command (assuming PlistBuddy is also included in your package): #!/bin/sh "$1/Contents/Resources/PlistBuddy" "$3/Library/Preferences/loginwindow.plist" < "$1/Contents/Resources/plb-commands" One thing to note is that the plb-commands file above will actually put them in the loginwindow.plist backwards (since we're adding to array element 0, at the beginning of the file each time). If, in your case, the execution order matters, you may have to reverse those two paragraphs in the plb-commands file. For more info on package scripts, be sure to look at the apple document: http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareD... --Dave
Date: Fri, 23 Jun 2006 13:39:42 -0400 From: "Perbix, Michael" <PERBIX@lmsd.org> Subject: loginwindow.plist
I need to add 2 items to the loginwindow.plist. It will be a post-flight script for a package.
I need to add the following...
$ defaults read /Library/Preferences/loginwindow
AutoLaunchedApplicationDictionary
(
{Hide = 0; Path = "/Applications/SMART Board Software/
SMARTBoardService.app"; },
{Hide = 0; Path = "/Applications/SMART Board Software/SMART
Board Tools.app"; }
)
Can this be done using defaults or plistbuddy?
I also will be running this either from my post-action script during imaging
Installer -pkg package1.pkg -target /Volumes/Macintosh\ HD
But adhoc I would be using the GUI to install on the boot drive, or via command line
Installer -pkg package1.pkg -target /
So my postflight script should get this value (installation path) then use plistbuddy to modify
<imagepath>/Library/Preferences/loginwindow.plist
With the items below.
Thank you.
-Mike
-----Original Message----- From: installer-dev-bounces+perbix=lmsd.org@lists.apple.com [mailto:installer-dev-bounces+perbix=lmsd.org@lists.apple.com] On Behalf Of Perbix, Michael Sent: Friday, June 23, 2006 1:40 PM To: installer-dev@lists.apple.com Subject: loginwindow.plist
I need to add 2 items to the loginwindow.plist. It will be a post-flight script for a package.
I need to add the following...
$ defaults read /Library/Preferences/loginwindow
AutoLaunchedApplicationDictionary
(
{Hide = 0; Path = "/Applications/SMART Board Software/
SMARTBoardService.app"; },
{Hide = 0; Path = "/Applications/SMART Board Software/SMART
Board Tools.app"; }
)
Can this be done using defaults or plistbuddy?
____________________________________
Michael Perbix
Lower Merion School District
Telecommunications Specialist
610-645-1964 - ph
610-598-2019 - fax