From: Claire on
Thank you Karl.
Now I understand, I hope.
When installing app to be used by all users how should the program be
installed?
I understand that HKLM must be used regarding the registry but how about app
path?
My app creates logs, keeps preferences in ini file, adds menu extension to
IE browser and installs plug-ins for FireFox.
How to do that for all the users?
Any pointers appreciated,
Claire

"Karl E. Peterson" <karl(a)exmvps.org> wrote in message
news:i0atsp$28h$1(a)news.eternal-september.org...
> Claire laid this down on his screen :
>> Karl, what is wrong with that folder:
>> C:\ProgramData\<my app title>
>> ?
>> It is listed on the webpage you provided link to.
>
> There is nothing "wrong" with it. As I said, it's just like
> HKEY_LOCAL_MACHINE in the registry, though. And "normal" apps no longer
> have *write* access to that, either.
>
> Your application should have no trouble *reading* data that's stored
> there. But this location isn't meant for ad hoc read/write access. The
> idea is to write there at setup, or in a similar "admin" mode, and then
> just read it from then on.
>
>> If that folder location is wrong which location will be safer?
>> I need the location for all users.
>
> Microsoft doesn't think that all users should be modifying each other's
> data anymore. Nothing you can do won't be "breaking the rules" in some
> way, if that's what you need, I'm afraid.
>
> Each user should be taking a copy of the original "config" (or whatever
> this data is) and then modifying their own copy in CSIDL_APPDATA, if you
> want to insure the highest compliance (least headaches).
>
> Straight from the horse's orifice:
> http://msdn.microsoft.com/en-us/library/ms995853.aspx#w2kcli_req42
>
> --
> .NET: It's About Trust!
> http://vfred.mvps.org
>
>


From: Viken Cerpovna on
> Hello,
> I am not sure what I am doing wrong.
> The fact is that I cannot recreate the problem on my computer, one of my
> users is struggling with.
> The problem is that on his computer app crashes with:
> "Run-Time error '75': Path/File access error" message.
> I have traced this problem to the point app wants to create folder in:
> C:\ProgramData\<my app title>
> That path is obtained using GetSpecialfolder(CSIDL_COMMON_APPDATA)
>
> Interestingly, I cannot recreate that crash on my computer.
>
> User has Vista Business (32 bit), with Administrator privilages and UAC is
> on.
>
> I have also noticed another strange thing about that Vista.
> It returns False to IsWinNT4Plus function:
> ============================
> Function IsWinNT4Plus() As Boolean
> Const VER_PLATFORM_WIN32_NT As Long = 2
> Dim osv As OSVERSIONINFO
>
> osv.OSVSize = Len(osv)
> If GetVersionEx(osv) = 1 Then
> IsWinNT4Plus = (osv.PlatformID = VER_PLATFORM_WIN32_NT) And
> (osv.dwVerMajor >= 4)
> End If
> End Function
> ============================
>
> Any comments and your help appreciated,
> Claire


I would suspect a permissions problem. Have you tried checking the Privilege
Level option for the application shortcut (Compatibility tab) to "Run this
program as an administrator"?

If this fixes the problem then you probably need to tweak the security
settings on the APPDATA folder.

Viken


From: Karl E. Peterson on
Claire pretended :
> When installing app to be used by all users how should the program be
> installed?

I don't do a lot of installs, so I can be vague at best.

> I understand that HKLM must be used regarding the registry but how about app
> path?

CSIDL_PROGRAM_FILES - But really, your install app should be wired for
that.

The HKLM analogy is important, though! Don't brush it off so quickly.
The concepts surrounding accessibility to that are the same as for the
folder you posted about.

> My app creates logs, keeps preferences in ini file, adds menu extension to IE
> browser and installs plug-ins for FireFox.
> How to do that for all the users?

You need to choose whether you plan to follow the rules or not. Advice
can only be based on that.

The general rule, though, is that you can't share like that anymore.
If your application finds that "this" is the first time it's run, then
it grabs a copy of that generic data and molds it to the current user,
forever disassociating itself at that point.

So, to specifically answer your question, in the vaguest possible
terms, I'd say, "One at a time" and/or during installation.

--
..NET: It's About Trust!
http://vfred.mvps.org


From: Karl E. Peterson on
on 6/28/2010, Viken Cerpovna supposed :
> I would suspect a permissions problem. Have you tried checking the Privilege
> Level option for the application shortcut (Compatibility tab) to "Run this
> program as an administrator"?
>
> If this fixes the problem then you probably need to tweak the security
> settings on the APPDATA folder.

# CSIDL_COMMON_APPDATA

This folder should be used for application data that is not user
specific. For 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. By default, this location is
read-only for normal (non-admin, non-power) Users. If an application
requires normal Users to have write access to an application specific
subdirectory of CSIDL_COMMON_APPDATA, then the application must
explicitly modify the security on that sub-directory during application
setup. The modified security must be documented in the Vendor
Questionnaire.

http://msdn.microsoft.com/en-us/library/ms995853.aspx#w2kcli_req42

--
..NET: It's About Trust!
http://vfred.mvps.org


From: Karl E. Peterson on
Karl E. Peterson used his keyboard to write :
> on 6/28/2010, Viken Cerpovna supposed :
>> I would suspect a permissions problem. Have you tried checking the
>> Privilege Level option for the application shortcut (Compatibility tab) to
>> "Run this program as an administrator"?
>>
>> If this fixes the problem then you probably need to tweak the security
>> settings on the APPDATA folder.
>
> # CSIDL_COMMON_APPDATA
>
> This folder should be used for application data that is not user specific.
> For 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. By default, this
> location is read-only for normal (non-admin, non-power) Users. If an
> application requires normal Users to have write access to an application
> specific subdirectory of CSIDL_COMMON_APPDATA, then the application must
> explicitly modify the security on that sub-directory during application
> setup. The modified security must be documented in the Vendor Questionnaire.
>
> http://msdn.microsoft.com/en-us/library/ms995853.aspx#w2kcli_req42

So the way I read that is, feel free to modify your own subdirectory
security settings, but DO NOT modify the APPDATA directory in any such
way.

--
..NET: It's About Trust!
http://vfred.mvps.org


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12
Prev: Sorting UDTs
Next: Copy from ListBox to TextBox