Re: Writing an Uninstaller
Re: Writing an Uninstaller
- Subject: Re: Writing an Uninstaller
- From: Rajendran P <email@hidden>
- Date: Wed, 27 Oct 2010 19:19:03 +0530
- Acceptlanguage: en-US
- Thread-topic: Writing an Uninstaller
HI ,
launch an applescript / shell script when uninstall button is clicked . This should first quit the App and wait for it to terminate and then delete the bundle and plist
Thanks
Rajendran P
On 10/27/10 5:46 PM, "eveningnick eveningnick" <email@hidden> wrote:
Hello
I have an application that creats, when installed, a bundle in
"Applications" and registers a .plist file for launchd in
~/Library/LaunchAgents (the agent is located in that bundle, and its
process is launched everytime the OS starts).
Thus, i can't let a user just to move bundle to the Trash bin, when he
wants to get rid of it. Thats why, in a "control panel" of my
application, i placed a button "Uninstall", which
1) stops the Agent
2) deletes the plist file
3) [should delete the bundle]
This control panel is located in this bundle, that has to be deleted.
And in Mac OS 10.6 a bundle whose application is running can't be
deleted.
What could i do here to delete the bundle? What is usually done in such cases?
o) After "uninstalling", ask user to manually move bundle to a trash
bin, and then terminate control panel application? Seems pathetic,
especially when user already pressed "Uninstall".
o) Copy a "bundle-deleting script" to the "autorun once", that will
launch next time with the next system boot? It seems like a good idea,
but could it be done somehow without leaving traces afterwards?
o) Copy to some "autocleanined" (like temp or something) folder a
script, launch it and terminate control application. That script will
wait, till the control app is terminated , and then remove the bundle.
But does such a folder exist in MacOS? and how could it possibly be
done?
I don't want to rubbish the user's Mac, if he/she doesn't like my App :)
Thanks!
_______________________________________________
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
_______________________________________________
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