Locating Applications Folder

Ask a Question related to Mac Programming, Design and Development.

  1. #1

    Default Locating Applications Folder

    Hi,
    I am writing an application in which I need to install it in
    Applications Folder. The problem is, In Jaguar the Applications Folder
    can be renamed as easily as any other folder(With admin Login). Mac OS
    10.1 does not allow renaming of Applications folder. But through
    terminal, logging in as root user one can rename it.
    For locating the Applications folder I am using
    FindFolder(). I am passing 'kLocalDomain' as the first parameter and
    'kApplicationsFolderType' as the second parameter. But after renaming
    applications folder, this API failed to detect Applications folder.
    This seems to be limitation of the API. Please help.

    ...gopu
    S. Gopu Pillai Guest

  2. Similar Questions and Discussions

    1. Locating C3 files in G5 iMac
      Where do I find my Contribute3 files in my G5 iMac, so that I can make a DVD before removing them? I want a clean start for 2007. John blueJred1
    2. Need Help Locating Templates
      Please help ... I just finished installing Contribute 3.11. And I went to FILE ==> New Page ==> Blank Web Page. From here I have tried many...
    3. Locating Help files?
      Any ideas here: when I click F1 or select "help" from my InDesign menu, it stalls without finding the help file (which is in...
    4. Locating fields in grid
      I have a grid with Contact information, Last Name, First Name, Address, City, State, Zip. etc.... There are about 2000 or more records on the...
    5. Locating assemblies in ASP.NET
      An ASPX page in a virtual directory does not find the compiled assembly containing the base class located in the application's bin directory...
  3. #2

    Default Re: Locating Applications Folder

    In article <19191854.0308210753.1a9e38e3@posting.google.com >,
    [email]sgopupillai@yahoo.com[/email] (S. Gopu Pillai) wrote:
    > Hi,
    > I am writing an application in which I need to install it in
    > Applications Folder. The problem is, In Jaguar the Applications Folder
    > can be renamed as easily as any other folder(With admin Login). Mac OS
    > 10.1 does not allow renaming of Applications folder. But through
    > terminal, logging in as root user one can rename it.
    Then it won't be recognized as the Application folder anymore. Mac OS X
    expects it to be /Applications. On foreign systems, the name is
    translated only when it's displayed, the actual folder name does not
    change.
    > For locating the Applications folder I am using
    > FindFolder(). I am passing 'kLocalDomain' as the first parameter and
    > 'kApplicationsFolderType' as the second parameter. But after renaming
    > applications folder, this API failed to detect Applications folder.
    Because apart from it's name and location, it has no way of finding it !
    > This seems to be limitation of the API. Please help.
    For now, it is safe to assume that the folder is /Applications. Apple's
    own installer makes that assumption, and breaks if the folder is moved
    or renamed.

    Patrick
    --
    Patrick Stadelmann <Patrick.Stadelmann@unine.ch>
    Patrick Stadelmann Guest

  4. #3

    Default Re: Locating Applications Folder

    In article <19191854.0308210753.1a9e38e3@posting.google.com >, S. Gopu
    Pillai <sgopupillai@yahoo.com> wrote:
    > Hi,
    > I am writing an application in which I need to install it in
    > Applications Folder. The problem is, In Jaguar the Applications Folder
    > can be renamed as easily as any other folder(With admin Login). Mac OS
    > 10.1 does not allow renaming of Applications folder. But through
    > terminal, logging in as root user one can rename it.
    > For locating the Applications folder I am using
    > FindFolder(). I am passing 'kLocalDomain' as the first parameter and
    > 'kApplicationsFolderType' as the second parameter. But after renaming
    > applications folder, this API failed to detect Applications folder.
    > This seems to be limitation of the API. Please help.

    I'm tempted to say that anyone who renames the Applications folder,
    deserves whatever they get, and it shouldn't be your problem.

    Since someone is likely not only to do this, but also complain
    at software developers when things go "blurgh!", how about this:

    In the installer: if the FindFolder call returns an error, popup a
    dialog asking where the user wants to do the installation.

    In your app: IIRC there are other constants/means to obtain the
    directory within which your application resides so that you can
    check this in your startup routine, should it be necessary for
    your application to know this (maybe to find associated files etc)

    HTH,

    Dave Stone
    David C. Stone Guest

  5. #4

    Default Re: Locating Applications Folder

    In article <19191854.0308210753.1a9e38e3@posting.google.com >,
    [email]sgopupillai@yahoo.com[/email] (S. Gopu Pillai) wrote:
    > I am writing an application in which I need to install it in
    > Applications Folder.
    You have no such need. It is very un-Mac-like to force an app into a
    particular folder in order to run. The only apps I have in
    /Applications are ones that should have been properly stored in the
    /System domain root (i.e., apps supplied by Apple). If your app doesn't
    run from any directory the user chooses to put it in (including the disk
    image it comes on) then you haven't written it right.
    Doc O'Leary Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139