Re: Win32_LogicalFileSecuritySetting takes a long time to respond

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



> Hi,
>
> Please can you try:
>
> 1. Run CACLS on the same folder logged in as the same person
> 2. Make the same call from WSH logged in as the same person
>
> How long do the above two things take?
>
> I have not had any problems with Win32_LogicalFileSecuritySetting. I
> only use JScript though, never touch VBAnything.
>
Hi Gerry,

I tried our suggestions and came up with the following:

@ 1: CACLS directly returns with the result that I get from my DLL (but
without the five minute break)

@ 2: Same call from WSH takes the same amount of time as it does with
the DLL

I tried to split the different steps up and got the following results:
***
Set wmiFileSecSetting = GetObject( _
"winmgmts:Win32_LogicalFileSecuritySetting.path='c:\\winnt'")
***
takes a lot of time to complete in the WSH-Script, all other lines of
code execute fast.

In Visual Basic there are two lines which take both about the same
amount of time:
***
Set wmiSecSetting =
oWMI.Get("Win32_LogicalFileSecuritySetting.Path='c:\\winnt'")
***
(this is the same as in the script)

and additionally
***
retval = wmiSecSetting.GetSecurityDescriptor(wmiSecurityDescriptor)
***

Unfortunately I can't just *not use VBAnything* because I need a DLL
from where I can call the function to retrieve the required
information. It's pretty annoying to see that on all "normal" systems
(so far we tested the program on about 30) within our network it works
alright, and just in our testroom it takes such a long time. By
definition the testroom should provide exactly the same settings as in
our network (and the systems access the same masterdomain), but somehow
something is different...

Do you still have some ideas!?

Thanks in advance

regards

Tim

.