• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Writing an Uninstaller
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Writing an Uninstaller


  • Subject: Writing an Uninstaller
  • From: eveningnick eveningnick <email@hidden>
  • Date: Wed, 27 Oct 2010 15:16:33 +0300

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

  • Follow-Ups:
    • Re: Writing an Uninstaller
      • From: Rajendran P <email@hidden>
    • Re: Writing an Uninstaller
      • From: Angus Hardie <email@hidden>
  • Prev by Date: Re: What causes NSFileManager's stringWithFileSystemRepresentation to return nil?
  • Next by Date: Re: WebView in NSTabView
  • Previous by thread: RE: custom outline view
  • Next by thread: Re: Writing an Uninstaller
  • Index(es):
    • Date
    • Thread