Thanks for your
kindly feedback.
I start the script
in postflight.
Like this: I put
the perl script in the /tmp directory, and start the perl script in postflight:
……
Chmod 777
/tmp/AddToDock.pl
/tmp/AddToDock.pl
rm �CRf
/tmp/AddToDock.pl
……
And I am also
sure the perl script is engaging.
I am very
interested of the situation that you have mentioned in your email.
And I guess that
my script do not work properly because of the admin authentication.
You should run
the script as the user who is going to be getting the new items placed into
their dock.
And when I use
installer to run the script, the user is admin.
So, I need your help that it is possible to turn off the
admin authentication when running the installer, if it is, so how to turn
off/on?
Any way, I have
done a test like this:
When I put this
in command line:
$defaults write
com.apple.dock persistent-apps -array-add
"<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Automator.app/</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>"
$killall Dock
It works
properly.
But if I add sudo
to the head of the default… in command line, it doesn’t work.
(
p: +86
Best wishes,
Andrew Li, Marvell Technology (Shanghai) Ltd
( p: +86
21 6165 5305 | 7 f: +86 21 5027 0219 | *email@hidden
From:
Bryan S. Lee [mailto:email@hidden]
Sent: 2008年6月20日
22:04
To: Andrew Li;
email@hidden
Subject: Re: Add app icon to Dock
How are you running the
script? As a postinstall? You could add a line to the script to create a file
on the desktop so that you can see if it is engaging.
I’ve had a script that engaged but not work properly because I needed it
to run as the user and left PackageMaker set to run with admin authentication
on, which then ran the script as root. Had to turn admin auth off.
--
Bryan S. Lee
Information Resource Consultant II
Computer Support Services
Clemson Computing and Information Technology
Clemson University
email@hidden
ACHDS 10.4, MCP NTS/NTW
From: Andrew
Li <email@hidden>
Date: Fri, 20 Jun 2008 04:25:27
-0400
To: <email@hidden>
Subject: Add app icon to Dock
Hello, My
question seems to be related to the PackageMaker tool, but I am not very sure
about it.
When I use the PackageMaker to make an installer for my application, I also
want to add the application’s icon to Dock. So, in order to implement
this feature, I write a Perl script that using “defaults write
com.apple.dock ……….” When I run the perl in Terminal
for testing, it is workable. But after I put it to installer, when run the
installer, the statement “defaults write com.apple.dock” seems not
workable, I am sure that the perl script have been executed.
And I have set the permissions correctly to this script. But I still have no
idea about this issue.
Thanks.
Andrew Li/Shanghai
_______________________________________________
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