Re: loginwindow.plist
Re: loginwindow.plist
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/SoftwareDistribution/Concepts/sd_pre_post_processing.html#//apple_ref/doc/uid/20001945
--Dave
> Date: Fri, 23 Jun 2006 13:39:42 -0400
> From: "Perbix, Michael" <email@hidden>
> 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=email@hidden
> [mailto:installer-dev-bounces+perbix=email@hidden] On Behalf
> Of Perbix, Michael
> Sent: Friday, June 23, 2006 1:40 PM
> To: email@hidden
> 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
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.apple.com/pipermail/installer-dev/attachments/20060623/1bb381b5/attachment.html
>
> ------------------------------
>
> _______________________________________________
> Installer-dev mailing list
> email@hidden
> http://lists.apple.com/mailman/listinfo/installer-dev
>
>
> End of Installer-dev Digest, Vol 22, Issue 18
> *********************************************
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden