PDA

View Full Version : Vista & CSIDL_? Values again



NewsArchive
10-24-2008, 01:52 AM
A brief question,

I have database files that I want to be available to all users on a
computer.

I have been installing them in CSIDL_COMMON_APPDATA

I need to be able to write to these files.

It has been working fine but now I have reports from users that
CSIDL_COMMON_APPDATA generated c:\ProgramData which seems to not aloow
opening in write mode.

I am considering a switch to CSICL_APPDATA

Comments ?

Mike

NewsArchive
10-24-2008, 01:53 AM
> I am considering a switch to CSICL_APPDATA

Id consider a switch to %rootdrive%\enercalc\ or %rootdrive%\enercalc\data.
--

Mark Riffey
http://www.rescuemarketing.com/blog/
Guy Kawasaki & the Wall Street
Journal staff read it, maybe you should too.

NewsArchive
10-24-2008, 01:55 AM
Not to harp back to my ancient clarionmag articles >>yet again<<...LOL...
BUT... I did point out that the CSIDL_COMMON_APPDATA on Vista is a folder to
which ordinary users do not have Write or Modify permissions.

CSIDL_APPDATA points to a folder within an individual user's folder... OK,
unless he needs to share the data with anybody else who uses the machine.

Of course, you can always use icacls or SetupBuilder to change permissions.
But I favor the suggestion Mark makes to create your own data folder off the
root, which is what I do. Probably not a good idea if you're looking for
Microsoft certification, but I don't see any other downside.

Jane

NewsArchive
10-24-2008, 01:56 AM
Yes Jane...I do remember.

But it's much esier to post a question than to re-read everything <BG>

I will check SetupBuilder for permission change ability.

MDB

NewsArchive
10-24-2008, 01:57 AM
Hi
I use CSIDL_COMMON_DOCUMENTS (i think it's Arnor who recommend this one) and
do not seem to have any problems, but am i just lucky until now ??

Viggo Poulsen

NewsArchive
10-24-2008, 01:57 AM
Hi Viggo,

> I use CSIDL_COMMON_DOCUMENTS (i think it's Arnor who recommend this one) and
> do not seem to have any problems, but am i just lucky until now ??

I could have suggested it and I have been using it for a while now with zero
problems that I know about:) I use it for shared stuff that may need to be
written to, but mainly read from the application, but also accessed by the
installer.

Best regards,

--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
10-24-2008, 01:58 AM
Why CSIDL_COMMON_DOCUMENTS over CSIDL_APPDATA ?

MDB

NewsArchive
10-24-2008, 01:59 AM
Michael

Because Windows lets Everyone read/write to CSIDL_COMMON_DOCUMENTS but write access to
CSIDL_APPDATA requires write permission to be explicitly set for users.

I use an encoded TPS file for several program settings which is controlled via my
program. Have never had a problem from any clients.

But, I agree, that CSIDL_APPDATA looks like the logical place to put program data, and
it works great so long as you are able to manage all the required permission settings.

With SB6, you can give full access to the folder by specifying the EVERYONE group.

HTH

John Griffiths

NewsArchive
10-24-2008, 02:00 AM
I just noticed Jane's post and I should have been saying
CSIDL_COMMON_APPDATA in my post.

John Griffiths

>But, I agree, that CSIDL_APPDATA looks like the logical place to put program data, and
>it works great so long as you are able to manage all the required permission settings.

NewsArchive
10-24-2008, 02:01 AM
Mike,
I know better than to post when I've enjoyed fermented grapes.
BUT...

I just don't understand the laziness.
"Don't make me read anything. Just give me a checklist."

OK. Don't read my articles. Download Randy's csidl enumerator from cmag
and run it.

In response to your particular question... running his app on my Vista 64
box (pic) I find that CSIDL_APPDATA resolves to
C:\Users\Jane\AppData\Roaming

Look at the NTFS permissions on that folder (and by default on anything
beneath it). See attached pic. Your original post in this thread says you
want all users to have access to the data. Does this look appropriate???

I respect legitimate requests for help.
Sorry, but I don't respect outright laziness.

Jane

NewsArchive
10-24-2008, 02:03 AM
> Mike,
> I know better than to post when I've enjoyed fermented grapes.
> BUT...
>
> I just don't understand the laziness.
> "Don't make me read anything. Just give me a checklist."
>
> OK. Don't read my articles. Download Randy's csidl enumerator from cmag
> and run it.

Jane,

Here is Arnor Baldvinsson of Icetips Creative version of it called -

Product Description - Icetips Special Folders, MFG - Icetips Creative
Internet Link - http://www.icetips.com/downloadfile.php?FileID=71

Special Folders

"List all Special Folders (CSIDL) on your computer. This program can be
installed on any computer to see and print a list of all the CSIDL folders
on the computer. This can save a lot of time to figure out where what
folders are."

David

--
From David Troxell - Product Scope 7 - Encourager Software
Clarion Third Party Profile Exchange Online
http://encouragersoftware.com/profile/clarlinks.html
Profile Exchanges - www.encouragersoftware.com/profile/
http://www.profileexchanges.com/blog/

NewsArchive
10-24-2008, 02:04 AM
Hi Michael,

> Why CSIDL_COMMON_DOCUMENTS over CSIDL_APPDATA ?

http://technet.microsoft.com/en-us/library/bb742580.aspx

"CSIDL_APPDATA

As part of the User profile, this folder will roam. Use this folder to
store all user-specific application preferences. "


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

Best regards,

--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
10-24-2008, 02:05 AM
> Why CSIDL_COMMON_DOCUMENTS over CSIDL_APPDATA ?

Please allow me to repost a previously mentioned interesting SetupBuilder
related thread from the Microsoft MSDN forum:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1213890&SiteID=1

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
10-24-2008, 02:06 AM
How do I set permission for CSIDL_COMMON_APPDATA\MyFolder to allow write
access in SetupBuilder?

Check "SetAccessControl" function but it didn't seem applicable.

Thank you,

MDB

NewsArchive
10-24-2008, 02:06 AM
Hi Michael

If for a PC on a Workgroup based system, have a look at this Post I wrote on the
Lindersoft forums. see the last para.

http://www.lindersoft.com/forums/showpost.php?p=21755&postcount=8

specifically...
"I tested with the inbuilt SetAccessControl function and left the DOMAIN field blank
and set username to everyone."

HTH

John Griffiths

NewsArchive
10-26-2008, 02:58 AM
Yes...I have used his tool and it's a quick help.

MDB

NewsArchive
10-26-2008, 02:58 AM
Hi Jane,

I was kidding, I am anything buy lazy and I like opinions from those who've
experienced success.

MDB

NewsArchive
10-26-2008, 03:00 AM
Does the attached look like the correct way to give read/write/modify
permission to the folder for all users ?

MDB

NewsArchive
10-26-2008, 03:00 AM
> Does the attached look like the correct way to give read/write/modify
> permission to the folder for all users ?

No. I'll send a screenshot in a minute...

Friedrich

NewsArchive
10-26-2008, 03:01 AM
See attached. But please note that "ProgramData" it is STILL a hidden
(system) folder under Vista/2008/etc.

I would *not* use this folder.

Does this help?

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
10-26-2008, 03:02 AM
Yes, certainly does,

But from everything I have read COMMON_APPDATA is that I need.

I want the data to be available for all users on the comouter, they will not
edit the files but my program needs to.

My issue is that I ahve an installed base of thousands that uses this
folder. Works fine in XP and in nearly all cases of Vista. I want to simply
change the status of this folder for those Vista users who are having
trouble.

In a future update I will handle moving these files to COMMON_APPDATA OR
COMMON_DOCUMENTS in code.

Thank you Friedrich,

Mike

NewsArchive
10-26-2008, 03:03 AM
Hi Mike,

Aha, okay. Makes sense.

Friedrich

NewsArchive
10-26-2008, 03:03 AM
> they will not edit the files but my program needs to.

That phrasing may or may not indicate a misconception... if not in your
mind, I've heard it in others.

Somewhat simplistically speaking, PROGRAMS don't have rights, USERS have
rights. (Leaving aside the integrity levels introduced with Vista).

A program has the rights of the user account that invokes it.

(In some cases on Vista and 2k8, the accounts used to run services (whether
SYSTEM or a created account) can be specified a reduced subset of the rights
and permissions of the account under which they run).

Jane