|
kdyer> For your - c:\WINNT and your - ("\\" + $system + "\c$\WINNT..
Yup you’re right. This is still test code I haven't done much in the way of best practices on it yet.
NTDOC> However there must be something else to the picture because using the MyComputerInfo script gets the version of hundreds of files and it certainly can't be loading the entire program into memory just to read the version.
Don't know what is going on there exactly. I can only comment on what my bandwidth meter reports. The execution speed is quick with the Non-WMI method, but I'm working with an intent to run this script on 200 - 300 systems, so I don't want to tie up the network if I can avoid it. This is what attracted me to the WMI method in the first place.
I did think about using the remote execution method, but I kind of wanted to avoid putting anything on the remote systems.
We are using McAfee for our virus scanner and local firewall so interference from that is a real possibility. I will try running with them disabled on my local system.
Changing to the SWbemLocator connection method did give me about a 10% speed boost. I'm happy to say. Still takes 13-15 local and 38-42 remote.
I'm digging through My Computer Info - for Help Desk use PART 4 to see if I can spot a difference in your requests.
>sealeopard You could also run the query asynchronously or optimize the WQL queries.
I did some research on how to run the query Asyn. Either I'm doing it wrong or it doesn't help. As for optimizing the query. How would I go about doing that?
|