Anteaus Posted March 10, 2010 Share Posted March 10, 2010 A utility of mine (ReProfiler) works on all the computers I have tested it on here, but reportedly fails in some specific (and rather obscure) circumstances on others. I think I've traced the problem to a failure to access the \root\cimv2 WMI object, which in this case is queried to get user-account information. Aut2EXE is 3.3.0.0 $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colItems = "" $strComputer = "localhost" $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") if @error then msgbox(0,"WMI Error","This computer shows the error") exit endif $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_UserAccount", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)I can simulate the problem here by disabling the WMI service, but I doubt if this is the actual issue. -Any ideas? Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 10, 2010 Share Posted March 10, 2010 What makes you think WMI service is running on those failing units? Check for that service first. After that it would be some kind of permissions issue. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Anteaus Posted March 11, 2010 Author Share Posted March 11, 2010 What makes you think WMI service is running on those failing units? You may have a point. Perhaps I could include some diagnostic checks in the code. The only other thing I can think of is a firewall or 'Internet Security' package that's blocking access to WMI. Link to comment Share on other sites More sharing options...
ResNullius Posted March 12, 2010 Share Posted March 12, 2010 WMI might also be screwed up on those machines. I've had to use the procedure on this page http://windowsxp.mvps.org/repairwmi.htm more than once when WMI queries weren't performing as expected. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now