Re: Common place to write application data
- From: "Alexander Grigoriev" <alegr@xxxxxxxxxxxxx>
- Date: Thu, 7 Jun 2007 20:42:41 -0700
If you want it to access a shared network folder, mount a drive letter to
that folder in your domain logon script. Every user will have it. You can
create the folder with appropriate permissions.
Some things should just be done by administrative methods. This is what
domain administrators are for.
"Francois PIETTE" <fpiette@xxxxxxxxxxxxxxxxx> wrote in message
news:e39w0STqHHA.4716@xxxxxxxxxxxxxxxxxxxxxxx
I think CSIDL_COMMON_APPDATA is the location you want.
If you read again my original message, I'm saying that
CSIDL_COMMON_APPDATA is a location where a user has no permission.
Normally your application installer, running as administrator, would
create a subdirectory of that directory with your company name, then a
subdirectory of that for your application, and set whatever security you
need for those directories.
That is not possible. There is no installation. The program has to run as
is.
If there where an install, obviously it would very easy to create a
directory anywhere and allow access for all users. And I would not ask in
this newsgroup.
You must know that the application is already running on something like
500 computers connected to the company LAN and need such public access to
a folder. It is not possible to have someone manually configuring each of
the computer: would be too expensive and too time consuming.
Currently the only possiblity I see is to check for write access to a
subfolder in CSIDL_COMMON_APPDATA and if no access, grant the permission.
To do that, I would hide the domain usercode/password in the program, use
the impersonate API functions to log the program - silently - as the
domain admin, and then grant the permission to all users. But I don't like
that solution...
--
francois.piette@xxxxxxxxxxx
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be
"Larry Futrell" <lfutrell@xxxxxxxxxxxxxxxxx> a écrit dans le message de
news:enX5vzSqHHA.5068@xxxxxxxxxxxxxxxxxxxxxxx
Francois PIETTE wrote:
It looks like "All Users" folder (CSIDL_COMMON_APPDATA) is write only
for
non administrator user.
Where is the standard place where an application has write permission no
matter from which user profile it is accessed ? I need a place which is
the same whatever the user is logged in. It is to store global data, not
data specific to a given user.
btw: I'm using SHGetSpecialFolderPath API function. My application has
to
run under W2K, XP and Vista with user running without administrator
permissions.
Thanks
I think CSIDL_COMMON_APPDATA is the location you want. Normally your
application installer, running as administrator, would create a
subdirectory of that directory with your company name, then a
subdirectory of that for your application, and set whatever security you
need for those directories. See the following link (a Windows 2000
document which is still mostly applicable to Vista) for more details.
http://msdn2.microsoft.com/en-us/library/ms995853.aspx
--
Larry Futrell
.
- Follow-Ups:
- Re: Common place to write application data
- From: Francois PIETTE
- Re: Common place to write application data
- References:
- Common place to write application data
- From: Francois PIETTE
- Re: Common place to write application data
- From: Larry Futrell
- Re: Common place to write application data
- From: Francois PIETTE
- Common place to write application data
- Prev by Date: Re: Using SetConsoleCtrlHandler
- Next by Date: Re: Common place to write application data
- Previous by thread: Re: Common place to write application data
- Next by thread: Re: Common place to write application data
- Index(es):
Relevant Pages
|
Loading