[Q] How to add a program as a login item after installing?
[Q] How to add a program as a login item after installing?
- Subject: [Q] How to add a program as a login item after installing?
- From: JongAm Park <email@hidden>
- Date: Sat, 21 Jun 2008 23:21:56 -0700
Thanks for the quick response.
Well, in my case, we wanted to avoid such workflow.
We want installing & running the special app to be transparent from
users.
The program will add a status bar menu item and that's all. It should
run transparent.
I know that there is a way to put Objective-C /Carbon code into the
app and when it is once launched, it registers itself as a login item.
However, under that scenario, a user should launch it for himself at
least.
If current approach is not possible, it may be better to put an
AppleScript file on the user's desktop and guide him to launch it.
By the way, do you think that running the AppleScript in root
privilege in the installer package can be the cause of my problem?
Thank you.
On Jun 21, 2008, at 11:08 PM, Peelman Nick wrote:
I would have MyTroubledApp prompt the first time it runs and ask the
user if they wanted it to become a login item, then use the internal
Cocoa methods to set it. As i said, setting something like that
transparently with a package is _BAD_ form. The process should be
done by the user, with their consent. Apple added the functionality
to add login items via applescript so that USERS could script things
like that, not so that developers could do it. They have much
better methods built into Cocoa to do things like that.
That's just me, design principles from Apple, and the dozens of
other programs that already do things that way talking though...
-nick
--
Nick Peelman
email@hidden
"The secret to success is knowing who to blame for your failures."
On Jun 22, 2008, at 2:03, JongAm Park wrote:
Hello.
Thank you for having interest in this issue.
I don't understand your first (A) statement.
What I would like to do is to install a Cocoa program, called
MyTroubledApp.
And using an AppleScript or whatever method, I would like to add
the MyTroubledApp to the login item of the user who runs the
installer.
On Jun 21, 2008, at 9:15 PM, Peelman Nick wrote:
I'm not sure I follow what you're doing...are you:
A) trying to have that applescript even fire as part of the
automated task list of the package
or
B) Trying to use a package install that app which is actually just
an applescript saved as a .app?
in the case of A i recommend using a different method, as apps
that silently and without permission install themselves as a login
item is generally a _bad_ thing unless there is a very specific
reason for it. They can also cause problems with automated
deployments using Apple Remote Desktop or other 'pushing'
distrubtion methods as if the machine is at a login window it can
start a menubar, dock, and sometimes even Finder, all of which are
owned by root UNDER the login window, and fully usable by anybody
who sits at the console, effectively rooting that box without the
person ever have to do anything.
in teh case of B you may be missing resource forks, as those
always bit me in the ass when trying to push a saved applescript.
Then i started using Iceberg and my life got a whole lot simpler
(no i'm serious, if you can use something as complicated and un-
friendly as PM you can use Iceberg and building the same package
will take you a fraction of the time and frustration, i promise).
If i completely missed the ball let me know and if i can get on
the same page i'll try to present more applicable help!
-nick
--
Nick Peelman
email@hidden
Let's agree to respect each others views, no matter how wrong
yours may be
On Jun 20, 2008, at 19:34, JongAm Park wrote:
Hello, all.
I'm trying hard to wrap an application program using the
PackageMaker.
By searching on the Apple site, I could copy & paste this
AppleScript :
tell application "System Events"
make new login item at end with properties { path:"/Library/
Application Support/Final Cut Pro System Support/Plugins/blah
blah.app", hidden:false}
end tell
It is saved as an application and also added to the package.
After choosing the whole packages heading and I added the Apple
Script app as a post installation item.
However, it doesn't add the blahblah.app to the login item.
If I double click the file in the Finder, it adds the interested
app to the login item successfully.
Can anyone help me to solve this problem?
Thank you.
_______________________________________________
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
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden