Re: Installation directory and application data...

From: Ron Ruble (raffles2@att.net)
Date: 09/02/02


From: "Ron Ruble" <raffles2@att.net>
Date: Mon, 02 Sep 2002 17:21:46 GMT


"FB" <unknownspam@unknown.com> wrote in message
news:um$4FEmUCHA.3868@tkmsftngp11...
> in general I guess writing to a file location that is under 'Program
Files'
> directory is a security issue and should be avoided, so where do MS
suggest
> I write application data and config files?

Starting with XP, the application folders under Program Files
are not modifyable for ordinary user accounts.

I've since checked the Windows XP Logo Requirements
document, and found the following information:

SHGetFolderPath can be used to find the folder corresponding
to CSIDL_COMMON_APPDATA

>From the Logo Requirements doc, section 3.0
(Data and Settings Management).

"CSIDL_COMMON_APPDATA
This folder should be used for application data that is
not user specific. Note that a limited user will only have
read privilege for files in this folder, except for the files
that user created.

_If users need to have write access to the common files,
then during installation the application must create a
sub-folder of CSIDL_COMMON_APPDATA with
"Modify" privilege for all users._ (emphasis mine)

EXAMPLE An application may store a spell-check
dictionary, a database of clip art or a log file in the
CSIDL_COMMON_APPDATA folder. This information
will not roam and is available to anyone using the computer."

Sounds like the best bet. The only annoyance is needing
to toggle the Modify privilege for all users on the new
folder. If you are using Windows Installer, it appears
to support both the folder creation and modification
of permissions, but I haven't used these features of
installer. I would imagine reasonably up to date versions
of InstallShield and Wise also support this, but how
readily would be a question for someone else.

Hope this helps.

--
Ron Ruble
For additional programming info, go to my web site:
http://home.att.net/~raffles1/
Please direct additional questions to the newsgroup,
rather than email, so others may benefit from the
discussion.


Relevant Pages

  • Re: Aero and Aqua
    ... OS X is, however, closer to Windows than ... and then move the application to the Applications folder. ... for the most part the installer process works ...
    (comp.sys.mac.advocacy)
  • Re: Im a Mac engineer ;-(
    ... it would just appear as an open folder. ... I could run the installer from there. ... why it is less common) it would do the same thing as the mac as well. ... practically identical on windows and OSX. ...
    (uk.comp.sys.mac)
  • Re: Exceptionally large Installer folder
    ... My Installer Folder is 39.2 GB. ... Why will your computer not allow you to backup? ... When I say backup - I mean connecting some external media to that computer ...
    (microsoft.public.windowsxp.general)
  • Re: Exceptionally large Installer folder
    ... My Installer Folder is 39.2 GB. ... System Restore Backup of your stuff. ... that external media. ...
    (microsoft.public.windowsxp.general)
  • Re: Exceptionally large Installer folder
    ... 39.2GB to 818MB in that folder. ... My Installer Folder is 39.2 GB. ... Why will your computer not allow you to backup? ... When I say backup - I mean connecting some external media to that computer ...
    (microsoft.public.windowsxp.general)