From: Nobody on
"Bee" <Bee(a)discussions.microsoft.com> wrote in message
news:F43267B0-46BA-40CB-ACC2-D7FE7AC86748(a)microsoft.com...
> My app can generate many gigabytes of data files (several megabytes each)
> per
> the user choice. For those who wonder, this happens over many hours and
> or
> days.
>
> I am making XP and up a requirement for using the app.
> So, for XP and up how do I do the following:
>
> (1)Set permissions on a different hard drive (other than C:) to read,
> write
> and delete data files.
> (a)for this user
> (b)for all users (common data).
>
> (2)Create a folder (assumes this is different than "normal").
>
> I may be totally wrong, but I assume that reading, writing and deleting
> the
> file in this folder once created is as usual.
>
> (3) when I reopen the app, do I need to do anything if I find the folder
> previously created? e.g. set permissions again? etc.


Setting the permissions will not work unless the user has enough privileges,
so if user can't do it with Windows Explorer, your application can't, it
would get access denied errors. One solution is at install time, install an
ActiceX EXE and configure it to run as SYSTEM, then talk to it using your
app. This AX EXE would change the permissions for you.

Another approach is to use the already available writable folders. Here are
some choices:

1 - Per user: Use CSIDL_LOCAL_APPDATA. You cannot use CSIDL_APPDATA or
CSIDL_PERSONAL(My Documents) because if roaming was enabled, it would take
forever for the user to log on or log off. When a roaming user logs on or
off, his profile(including My Documents, and CSIDL_APPDATA, and the user's
version of HKEY_CURRENT_USER) are transported back and forth from a server,
so this would take a long time if there are big files in these locations.

2 - All users: Use CSIDL_COMMON_DOCUMENTS. This is usually in XP/2003:

C:\Documents and Settings\All Users\Documents

In Windows Explorer, go to the bottom of the folders list and try to find
"Shared Documents". This is the friendly name of the above folder.

In Vista+, this is "C:\Users\Public\Documents", with a friendly name "Public
Documents" under a friendly name "Public" folder.

This folder, unlike CSIDL_COMMON_APPDATA, can be read and written to by all
users without needing to change the permissions. It's for user saved files
that are meant to be shared by all users on the same computer. It's not
"suitable" for INI files and the like as much as they are not suitable in
"My Documents" folder. They would be seen as being stored in an odd place.





From: Nobody on
"mayayana" <mayayana(a)nospam.invalid> wrote in message
news:%23tHa9DbvKHA.5936(a)TK2MSFTNGP04.phx.gbl...
> to all. If D:\MusicStore\ needs to be accessible to all,
> on an NTFS system, I suspect that *does* need
> permissions set.

By default, members of the "Users" group and unelevated admins can create
folders and files under the root of an NTFS drive, they can read and write
to them, but other users don't have write access to these files and folders.
Elevated Administrators and Power Users can read or write to these
locations. This is the same situation as with CSIDL_COMMON_APPDATA.




From: MikeD on


"Bee" <Bee(a)discussions.microsoft.com> wrote in message
news:E1C3C4C4-B52C-470B-B79C-82AA37027196(a)microsoft.com...
>
> spankings do not work with me and it did little to help with the question.
>
> so how is the home user supposed to know how to set permissions?
> most of them can barely start an application.
> people have a right to use their PC as they choose so I am providing a
> option for them. read OPTION !
> so they do not have to deal with the UAC at every mouse click.
>
> P.S. logical suggestions work with me.


Quite an attitude for somebody constantly asking for help.

Fine, I won't offer suggestions to you anymore. Happy?

--
Mike


From: Paul Clement on
On Fri, 5 Mar 2010 17:36:36 -0800, Bee <Bee(a)discussions.microsoft.com> wrote:

� My app can generate many gigabytes of data files (several megabytes each) per
� the user choice. For those who wonder, this happens over many hours and or
� days.

� I am making XP and up a requirement for using the app.
� So, for XP and up how do I do the following:

� (1)Set permissions on a different hard drive (other than C:) to read, write
� and delete data files.
� (a)for this user
� (b)for all users (common data).

� (2)Create a folder (assumes this is different than "normal").

� I may be totally wrong, but I assume that reading, writing and deleting the
� file in this folder once created is as usual.

� (3) when I reopen the app, do I need to do anything if I find the folder
� previously created? e.g. set permissions again? etc.

The following should help you set permissions:

http://support.microsoft.com/kb/825751

ADSI (which is a little more complicated):

http://support.microsoft.com/kb/266461

I don't really understand what you're asking in questions 2 & 3.

Paul
~~~~
Microsoft MVP (Visual Basic)
From: Bee on
Where is the suggestion on WHAT TO DO?

"MikeD" wrote:

>
>
> "Bee" <Bee(a)discussions.microsoft.com> wrote in message
> news:E1C3C4C4-B52C-470B-B79C-82AA37027196(a)microsoft.com...
> >
> > spankings do not work with me and it did little to help with the question.
> >
> > so how is the home user supposed to know how to set permissions?
> > most of them can barely start an application.
> > people have a right to use their PC as they choose so I am providing a
> > option for them. read OPTION !
> > so they do not have to deal with the UAC at every mouse click.
> >
> > P.S. logical suggestions work with me.
>
>
> Quite an attitude for somebody constantly asking for help.
>
> Fine, I won't offer suggestions to you anymore. Happy?
>
> --
> Mike
>
>
> .
>
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8
Prev: Filling an excel range from a vb function
Next: 1.0e to VB6