Mac Thread, Packaging software in Technical; Hi all,
I want to do two things...
1 - Combine multiple packages into one package (i.e. install multiple pieces ...
-
22nd December 2009, 07:22 AM #1
- Rep Power
- 8
Packaging software
Hi all,
I want to do two things...
1 - Combine multiple packages into one package (i.e. install multiple pieces of software with one installer). Can I do this with PackageMaker?
2 - Add icons to the dock as part of the installer package. (i.e. If I install Word I want the Word icon in the dock after install is complete)
Any suggestions on how to go about this?
thanks!
-
-
IDG Tech News
-
26th December 2009, 01:37 AM #2
- Rep Power
- 8
So I've made some progress on this...
I can accomplish #1 with an .mpkg and I can do #2 with a script. However, the issue I'm running in to is that, when I run the script as postinstall or postflight at the end of the package, it is run as root and, therefore, does not have any effect on the individual's dock.
Any thoughts on how I can get that final script to run as the USER even though the package is run as root?
Thanks!
-
-
27th December 2009, 10:59 PM #3
- Rep Power
- 8
So I finally figured out how to do this, and I'll post my findings here in case anyone else is interested.
To run the script as the user and make changes to the current user's dock, I used the following:
----
#!/bin/sh
sudo -u $USER defaults write $HOME/Library/Preferences/com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Path/to/Application</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>"
killall Dock
exit 0
-
Thanks to MarsRed from:
dhicks (1st January 2010)
SHARE: 
Similar Threads
-
By ajbritton in forum Courses and Training
Replies: 3
Last Post: 18th August 2010, 02:04 PM
-
By Edu-IT in forum Windows
Replies: 67
Last Post: 1st February 2010, 02:39 PM
-
By powdarrmonkey in forum Network and Classroom Management
Replies: 5
Last Post: 20th October 2008, 10:08 PM
-
By eejit in forum Windows
Replies: 25
Last Post: 2nd August 2005, 10:06 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules