From: Bee on
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.

From: mayayana on
There's a compact class here that I use for my installers:

http://www.jsware.net/jsware/vbcode.php5#perms

There are 3 function:

1) Check the partition formatting. (XP is not necessarily on
NTFS. It may be on FAT32. And a data partition can be
FAT32. Permissions only apply to NTFS.)

2) Get current permissions on a file/folder/Registry key.

3) Set permissions on a file/folder/Registry key. The setting
permissions function is basic: add or remove full permission
for all.

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


From: MikeD 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.
>

My recommendation is to change your approach. There is NO reason whatsoever
that your app should have to mess around with setting permissions. This is
just going to lead to trouble down the road. If it's a "user's choice" then
let the user specify where these data files should be created. And to that
end, the user should only be specifying a location which he/she already has
permissions.

--
Mike



From: Bee on

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.

"MikeD" wrote:

>
>
> "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.
> >
>
> My recommendation is to change your approach. There is NO reason whatsoever
> that your app should have to mess around with setting permissions. This is
> just going to lead to trouble down the road. If it's a "user's choice" then
> let the user specify where these data files should be created. And to that
> end, the user should only be specifying a location which he/she already has
> permissions.
>
> --
> Mike
>
>
>
> .
>
From: mayayana on

> My recommendation is to change your approach. There is NO reason
whatsoever
> that your app should have to mess around with setting permissions.

Maybe I read it wrong, but it sounds to me like he's
thinking of providing storage on a non-C drive because
the saved files are so bulky. And that storage will
sometimes be per-user and sometimes be accessible
to all. If D:\MusicStore\ needs to be accessible to all,
on an NTFS system, I suspect that *does* need
permissions set.

Your adamant position of "NO reason whatsoever" needs
a qualifier: "....if this is software designed for use by
corporate employees on company workstations." My
impression is that his software is mainly for home use.

Or do you really believe that in no case, on no PC,
should people ever be allowed to share files from a common
folder?