Hi All

I have recently changed to a windows 2003 web server and I previously used
the ADsSecurity object to set folder permissions on webs that were created
using vbscript. Now, I get a cannot create object error and I assume this is
because the ADsSecurity.dll does not exist on windows server 2003.

I was wandering if I should register this dll with 2003 and if my code
should then work or if there is a new way of doing things with windows
server 2003.

Any advice would be truly welcomed.
Thanx in advance
Joe

Re: Set windows file permissions by Torgeir

Torgeir
Thu Mar 10 09:31:45 CST 2005

Joe Zammit wrote:

> Hi All
>
> I have recently changed to a windows 2003 web server and I previously used
> the ADsSecurity object to set folder permissions on webs that were created
> using vbscript. Now, I get a cannot create object error and I assume this is
> because the ADsSecurity.dll does not exist on windows server 2003.
>
> I was wandering if I should register this dll with 2003 and if my code
> should then work or if there is a new way of doing things with windows
> server 2003.
Hi

For WinXP or Win2k3, use the builtin IADsSecurityUtility object.

Set oADsSecurityUtility = CreateObject("ADsSecurityUtility")

IADsSecurityUtility
http://msdn.microsoft.com/library/en-us/adsi/adsi/iadssecurityutility.asp

Example Code for Adding an ACE to a File
http://msdn.microsoft.com/library/en-us/adsi/adsi/example_code_for_adding_an_ace_to_a_file.asp


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx

Re: Set windows file permissions by Joe

Joe
Thu Mar 10 10:22:04 CST 2005

Cheers, I thought there must be another way as it was not installed by
default.

"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:#YABQbYJFHA.3628@TK2MSFTNGP15.phx.gbl...
> Joe Zammit wrote:
>
> > Hi All
> >
> > I have recently changed to a windows 2003 web server and I previously
used
> > the ADsSecurity object to set folder permissions on webs that were
created
> > using vbscript. Now, I get a cannot create object error and I assume
this is
> > because the ADsSecurity.dll does not exist on windows server 2003.
> >
> > I was wandering if I should register this dll with 2003 and if my code
> > should then work or if there is a new way of doing things with windows
> > server 2003.
> Hi
>
> For WinXP or Win2k3, use the builtin IADsSecurityUtility object.
>
> Set oADsSecurityUtility = CreateObject("ADsSecurityUtility")
>
> IADsSecurityUtility
> http://msdn.microsoft.com/library/en-us/adsi/adsi/iadssecurityutility.asp
>
> Example Code for Adding an ACE to a File
>
http://msdn.microsoft.com/library/en-us/adsi/adsi/example_code_for_adding_an_ace_to_a_file.asp
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scriptcenter/default.mspx