Home All Groups Group Topic Archive Search About
Author
2 Jun 2009 8:55 PM
John Simpson
Hi Group,

I need to write an application to create a directory structure on a Windoze
2000 server. Creating
the structure will not be a problem, but I will need to set different
permissions for different directories.
Can someone point me to an API that will solve this problem? I've done a
google on it, but that has
left me more confused. The originating OS will be XP using VB6.

Thanks in advance for any insight.

John S.

Author
2 Jun 2009 9:26 PM
Nobody
"John Simpson" <jas***@earthlink.net> wrote in message
news:uyaAES84JHA.3476@TK2MSFTNGP05.phx.gbl...
> Hi Group,
>
> I need to write an application to create a directory structure on a
> Windoze 2000 server. Creating
> the structure will not be a problem, but I will need to set different
> permissions for different directories.
> Can someone point me to an API that will solve this problem? I've done a
> google on it, but that has
> left me more confused. The originating OS will be XP using VB6.

Here are few solutions:

- Use SetACL command line tool, which is free and open source:

http://setacl.sourceforge.net/

- Using the API:

How to use low-level access control APIs from Visual Basic
http://support.microsoft.com/kb/316440

You may also want to check this site, which is for VB6 and lower despite the
site's name:

http://vbnet.mvps.org/index.html?code/network/index.html
Author
3 Jun 2009 12:28 PM
John Simpson
Show quote Hide quote
"Nobody" <nob***@nobody.com> wrote in message
news:uj6OIj84JHA.5276@TK2MSFTNGP04.phx.gbl...
> "John Simpson" <jas***@earthlink.net> wrote in message
> news:uyaAES84JHA.3476@TK2MSFTNGP05.phx.gbl...
>> Hi Group,
>>
>> I need to write an application to create a directory structure on a
>> Windoze 2000 server. Creating
>> the structure will not be a problem, but I will need to set different
>> permissions for different directories.
>> Can someone point me to an API that will solve this problem? I've done a
>> google on it, but that has
>> left me more confused. The originating OS will be XP using VB6.
>
> Here are few solutions:
>
> - Use SetACL command line tool, which is free and open source:
>
> http://setacl.sourceforge.net/
>
> - Using the API:
>
> How to use low-level access control APIs from Visual Basic
> http://support.microsoft.com/kb/316440
>
> You may also want to check this site, which is for VB6 and lower despite
> the site's name:
>
> http://vbnet.mvps.org/index.html?code/network/index.html
>
>

Thanks, Nobody. Now I've got to decide which way to go.

John
Author
3 Jun 2009 3:28 PM
Nobody
"John Simpson" <jas***@earthlink.net> wrote in message
news:ONMpZbE5JHA.1420@TK2MSFTNGP04.phx.gbl...
> Thanks, Nobody. Now I've got to decide which way to go.

To understand the security model, in MSDN Library, look for "Access-Control
Model" and read all the subtopics.
Author
3 Jun 2009 4:56 PM
John Simpson
"Nobody" <nob***@nobody.com> wrote in message
news:uPuT7$F5JHA.5276@TK2MSFTNGP04.phx.gbl...
> "John Simpson" <jas***@earthlink.net> wrote in message
> news:ONMpZbE5JHA.1420@TK2MSFTNGP04.phx.gbl...
>> Thanks, Nobody. Now I've got to decide which way to go.
>
> To understand the security model, in MSDN Library, look for
> "Access-Control Model" and read all the subtopics.
>
>

Thanks again.

My client has now decided that the directory structure may have
subdirectories appended to it
at times, so I've decided, rather than create the structure and set the
permissions each time, I'm going
to create one template with permissions already set, and use the .CopyFolder
method. Actually,
this will eliminate a whole lot of coding, and not require any maintenance.
BTW, if anyone is
interested, CopyFolder works fine with XP, but is hanging/crashing on my
VISTA machine. It'll
be interesting to see how it behaves with Windoze Server 2000.

John