GaryFrost Posted October 15, 2005 Author Share Posted October 15, 2005 the error your getting is from the code above, i just took the function and trimmed it down to just what was needed to test the wmi. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Valuater Posted October 15, 2005 Share Posted October 15, 2005 (edited) the error is not from the code above... it is from AdimTools ok... maybe you mean the error i am getting is from the code above that was inside Admin tools and you trimmed that code down for your example if so... the example above errored the same way when i placed the other computer names in it 8) Edited October 15, 2005 by Valuater Link to comment Share on other sites More sharing options...
Rahul Rohela Posted October 15, 2005 Share Posted October 15, 2005 Now i am using Beat... but still not working. Error is Line 236 (file "c:\AdminTool.au3): Case $GUI_EVENT_CLOSE, $exititem Error: "Case" Statement with no matching "Select" Statement. Please help I want to run & use this tool. I am using windows 2000. Link to comment Share on other sites More sharing options...
Rahul Rohela Posted October 15, 2005 Share Posted October 15, 2005 Working... Showing All PCs. But getting same error as posted by VALUATER. Second thing is don't want to scan Domain. Because it very very Big.. I am concerned only for my Subnet. I want to scan range of IP ... is it possible??? Link to comment Share on other sites More sharing options...
DaveF Posted October 15, 2005 Share Posted October 15, 2005 Thanks I forced one of the tools to error, but stderr didn't get any infoUpdated AdminTool, see first postGary That's kind of a disappoinment, but I guess you can test for the string "Error" in the output in any case... Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines. Link to comment Share on other sites More sharing options...
GaryFrost Posted October 15, 2005 Author Share Posted October 15, 2005 Working... Showing All PCs.But getting same error as posted by VALUATER.Second thing is don't want to scan Domain. Because it very very Big.. I am concerned only for my Subnet.I want to scan range of IP ... is it possible??? Originally I had the code traversing the ldap, problem with that is i had to traverse each ou, not sure how to get just a subnetthe domain at work usally has about 2500 to 2700 pcs online at any given time, if my filter is setup up to show all pcs online, doesn't take very long to load the way the program is setup at this time, this is why i created the fuzzy search.as to the problem your having not sure at this time, need to goto the case statement for $GUI_EVENT_PRIMARYDOWN and comment out the following _RetrieveAllSoftware ($lv_allsoftware, $s_Machine) _RetieveOSInfo ($eb_system, $s_Machine) _RetrieveProcessList ($lv_pid, $s_Machine) _RetrieveServices ($lv_services, $s_Machine) _RetrieveLoggedInUsers ($lv_loggedin, $s_Machine) _DriveInfo ($lv_drives, $s_Machine)that would only leave two functions when a pc is selected _GetRole ($s_Machine, $Status) _RetrieveSoftware ($lv_software, $s_Machine)if you don't get errors from those functions and it populates the softwarethen onto the next function, till find what the problem is.if you get errors from either the GetRole or the _RetrieveSoftware functions, then can narrow the problem down. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
BigDod Posted October 15, 2005 Share Posted October 15, 2005 Originally I had the code traversing the ldap, problem with that is i had to traverse each ou, not sure how to get just a subnetthe domain at work usally has about 2500 to 2700 pcs online at any given time, if my filter is setup up to show all pcs online, doesn't take very long to load the way the program is setup at this time, this is why i created the fuzzy search.as to the problem your having not sure at this time, need to goto the case statement for $GUI_EVENT_PRIMARYDOWN and comment out the following _RetrieveAllSoftware ($lv_allsoftware, $s_Machine) _RetieveOSInfo ($eb_system, $s_Machine) _RetrieveProcessList ($lv_pid, $s_Machine) _RetrieveServices ($lv_services, $s_Machine) _RetrieveLoggedInUsers ($lv_loggedin, $s_Machine) _DriveInfo ($lv_drives, $s_Machine)that would only leave two functions when a pc is selected _GetRole ($s_Machine, $Status) _RetrieveSoftware ($lv_software, $s_Machine)if you don't get errors from those functions and it populates the softwarethen onto the next function, till find what the problem is.if you get errors from either the GetRole or the _RetrieveSoftware functions, then can narrow the problem down.Commented out the functions as suggested but keep getting errors on GetRole and can't proceed. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
GaryFrost Posted October 15, 2005 Author Share Posted October 15, 2005 see where the error is using this code, replace GAF with your pc name Global Const $wbemFlagReturnImmediately = 0x10 Global Const $wbemFlagForwardOnly = 0x20 $s_pc = "GAF" Local $objWMIService, $colComputer, $objComputer $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $s_pc & "\root\cimv2") If @error Then MsgBox(16, "Unable to retrieve Role", "ObjGet Error: winmgmts") Exit EndIf $colComputer = $objWMIService.ExecQuery ("Select * from Win32_ComputerSystem", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If @error Then MsgBox(16, "Unable to retrieve Role", "Select * from Win32_ComputerSystem") Exit EndIf For $objComputer In $colComputer If Int($objComputer.DomainRole) = 1 Then MsgBox(0,"GetRole", $s_pc & " is WorkStation") ElseIf Int($objComputer.DomainRole) = 3 Then MsgBox(0,"GetRole", $s_pc & " is Server") ElseIf Int($objComputer.DomainRole) = 4 Then MsgBox(0,"GetRole", $s_pc & " is Backup Domain Controller") ElseIf Int($objComputer.DomainRole) = 5 Then MsgBox(0,"GetRole", $s_pc & " is Primary Domain Controller") Else MsgBox(0,"GetRole", "Unable to retrieve Role:" & $s_pc & @LF & $objComputer.DomainRole) EndIf Exit Next SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
BigDod Posted October 15, 2005 Share Posted October 15, 2005 see where the error is using this code, replace GAF with your pc nameGlobal Const $wbemFlagReturnImmediately = 0x10 Global Const $wbemFlagForwardOnly = 0x20 $s_pc = "GAF" Local $objWMIService, $colComputer, $objComputer $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $s_pc & "\root\cimv2") If @error Then MsgBox(16, "Unable to retrieve Role", "ObjGet Error: winmgmts") Exit EndIf $colComputer = $objWMIService.ExecQuery ("Select * from Win32_ComputerSystem", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If @error Then MsgBox(16, "Unable to retrieve Role", "Select * from Win32_ComputerSystem") Exit EndIf For $objComputer In $colComputer If Int($objComputer.DomainRole) = 1 Then MsgBox(0,"GetRole", $s_pc & " is WorkStation") ElseIf Int($objComputer.DomainRole) = 3 Then MsgBox(0,"GetRole", $s_pc & " is Server") ElseIf Int($objComputer.DomainRole) = 4 Then MsgBox(0,"GetRole", $s_pc & " is Backup Domain Controller") ElseIf Int($objComputer.DomainRole) = 5 Then MsgBox(0,"GetRole", $s_pc & " is Primary Domain Controller") Else MsgBox(0,"GetRole", "Unable to retrieve Role:" & $s_pc & @LF & $objComputer.DomainRole) EndIf Exit NextError received is "Unable to retrieve Role" "ObjGet Error: winmgmts" Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Valuater Posted October 15, 2005 Share Posted October 15, 2005 Error received is "Unable to retrieve Role" "ObjGet Error: winmgmts"I recieve the same error...@BigDodthis should work on your pc (Win Xp Home or Pro)Global Const $wbemFlagReturnImmediately = 0x10 Global Const $wbemFlagForwardOnly = 0x20 $s_Machine = "BLINGBLING" $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $s_Machine & "\root\cimv2") If @error Then MsgBox(16, "Test wmi", "ObjGet Error: winmgmts") Exit EndIf $colSoftware = $objWMIService.ExecQuery ("Select * from Win32_Product", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If @error Then MsgBox(16, "Test wmi", "ExecQuery Error: Select * from Win32_Product") Exit EndIf For $objSoftware In $colSoftware If $objSoftware.Caption <> "0" Then MsgBox(0, "Test wmi", "Caption: " & $objSoftware.Caption & @LF & _ "Version: " & $objSoftware.Version & @LF & _ "IdentifyingNumber: " & $objSoftware.IdentifyingNumber) EndIf Next8) Link to comment Share on other sites More sharing options...
BigDod Posted October 15, 2005 Share Posted October 15, 2005 I recieve the same error...@BigDodthis should work on your pc (Win Xp Home or Pro)Global Const $wbemFlagReturnImmediately = 0x10 Global Const $wbemFlagForwardOnly = 0x20 $s_Machine = "BLINGBLING" $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $s_Machine & "\root\cimv2") If @error Then MsgBox(16, "Test wmi", "ObjGet Error: winmgmts") Exit EndIf $colSoftware = $objWMIService.ExecQuery ("Select * from Win32_Product", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If @error Then MsgBox(16, "Test wmi", "ExecQuery Error: Select * from Win32_Product") Exit EndIf For $objSoftware In $colSoftware If $objSoftware.Caption <> "0" Then MsgBox(0, "Test wmi", "Caption: " & $objSoftware.Caption & @LF & _ "Version: " & $objSoftware.Version & @LF & _ "IdentifyingNumber: " & $objSoftware.IdentifyingNumber) EndIf Next8)Error received "Test wmi" "ObjGet Error: winmgmts"(Win XP PRO SP") Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Valuater Posted October 15, 2005 Share Posted October 15, 2005 (edited) and you used the name of your computer you are currently on.. not the local network name $s_Machine = "BLINGBLING" ; the name of my computer ? 8) Edited October 15, 2005 by Valuater Link to comment Share on other sites More sharing options...
BigDod Posted October 15, 2005 Share Posted October 15, 2005 and you used the name of your computer you are currently on..not the local network name?8)I used the name a computer on my network and got the message. When I use my computer name it works fine. Sorry for misleading you. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Valuater Posted October 15, 2005 Share Posted October 15, 2005 ok... seems Mr Wizard has taken on a project at his leveland... we will have to wait for more of his majic8( Link to comment Share on other sites More sharing options...
GaryFrost Posted October 15, 2005 Author Share Posted October 15, 2005 in your system32\wbem\Logs check the log files, more than likely it's a security issue. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
GaryFrost Posted October 15, 2005 Author Share Posted October 15, 2005 also, can run the wbemtest that's in the wbem folder, should help in figuring out what is wrong. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
GaryFrost Posted October 15, 2005 Author Share Posted October 15, 2005 after reading thru microsofts encrypted documentation, it looks like if you don't have a domain server to authenticate the user making the remote wmi request it won't work. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Valuater Posted October 15, 2005 Share Posted October 15, 2005 (edited) Thanks for your effort Gary its still an awesome program.... for those who have a Domain and for a single computer 8) Edited October 15, 2005 by Valuater Link to comment Share on other sites More sharing options...
busysignal Posted October 16, 2005 Share Posted October 16, 2005 qafrost, nice utility. I just dl'ed it and it looks great. I will have to wait till I get on my home network to try it out. Two-Thumbs Up! Cheers.. Link to comment Share on other sites More sharing options...
BigDod Posted October 16, 2005 Share Posted October 16, 2005 after reading thru microsofts encrypted documentation, it looks like if you don't have a domain server to authenticate the user making the remote wmi request it won't work.Shame, but it is still an awesome tool that lots of people will find useful.Keep up the good work. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother 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