Professional Web Applications Themes

Locating Applications Folder - Mac Programming

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. ...

  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. #2

    Default Re: Locating Applications Folder

    In article <19191854.0308210753.1a9e38e3posting.google.com >,
    [email]sgopupillai[/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.Stadelmannunine.ch>
    Patrick Stadelmann Guest

  3. #3

    Default Re: Locating Applications Folder

    In article <19191854.0308210753.1a9e38e3posting.google.com >, S. Gopu
    Pillai <sgopupillai> 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

  4. #4

    Default Re: Locating Applications Folder

    In article <19191854.0308210753.1a9e38e3posting.google.com >,
    [email]sgopupillai[/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

Similar Threads

  1. Running Java applications with CF applications
    By isleta13 in forum Coldfusion Server Administration
    Replies: 2
    Last Post: March 28th, 12:48 PM
  2. Need Help Locating Templates
    By amorg in forum Macromedia Contribute General Discussion
    Replies: 2
    Last Post: February 15th, 11:24 PM
  3. Locating Help files?
    By Michael in forum Adobe Indesign Windows
    Replies: 0
    Last Post: May 30th, 01:19 PM
  4. Replies: 0
    Last Post: August 21st, 12:11 AM
  5. Locating assemblies in ASP.NET
    By Hilton in forum ASP.NET General
    Replies: 0
    Last Post: July 22nd, 10:58 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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