John
Wed Sep 17 20:43:59 CDT 2003
I did some testing on=20
("winmgmts:Win32_LogicalShareSecuritySetting.name=3D'" &
strShareName & "'")
This will only work on a local share (i.e. C:\MyShare)=20
where strShareName=3D"MyShare". It doesn't work on a=20
Network Share (i.e. \\Dev1\MyShare). I'd love to know of=20
something that does.
John
>-----Original Message-----
>Scott Anderson wrote:
>> Hey Chris,
>>
>> Thanks for the help, but I am having a little trouble
>> getting your script to run. It seems to work fine=20
until I
>> get to this line:
>>
>> Set wmiFileSecSetting =3D GetObject
>> ("winmgmts:Win32_LogicalShareSecuritySetting.name=3D'" &
>> strShareName & "'")
>>
>> It seems that maybe the format of strShareName is=20
wrong.
>> I have tired changing the format of strShareName and=20
using
>> the line without the ".name", but "Get Security
>> Descriptor" alaways fails. Also if I comment out "On
>> Error Resume Next" the "Set wmiFileSecSetting..." line
>> above errors out with the following error.
>> C:\vb\Production VB\Untitled1.vbs(27, 2) (null):=20
0x80041002
>
>You're having a problem with the code wrapping in the=20
post.
>
>Here's a version of the line with the problem using=20
explicit line breaks,
>statement continuation ( _ ) and string concatenation (=20
& ).
>
>Set wmiFileSecSetting =3D _
> GetObject("winmgmts:" _ &
> & "Win32_LogicalShareSecuritySetting.name=3D'" _
> & strShareName & "'")
>
>
>
>--=20
>Michael Harris
>Microsoft.MVP.Scripting
>
>Windows 2000 Scripting Guide
>Microsoft=AE Windows=AE2000 Scripting Guide
>
http://www.microsoft.com/technet/scriptcenter/scrguide/sa
gsas_overview.asp
>
>System Administration Scripting Guide - samples scripts
>
http://www.microsoft.com/downloads/release.asp?
ReleaseID=3D38942
>
>WSH 5.6 documentation download
>
http://www.microsoft.com/downloads/details.aspx?
FamilyId=3D01592C48-207D-4BE1-8A76-
1C4099D7BBB9&displaylang=3Den
>
>
>.
>