E-joy Posted July 19, 2006 Share Posted July 19, 2006 Thanks a lot! Link to comment Share on other sites More sharing options...
JSThePatriot Posted July 24, 2006 Share Posted July 24, 2006 (edited) I am not positive I have the most up to date version. I will try again in a short bit. When I try the "Run" button from the Scriptomatic, it only works when I run Scriptomatic FROM SciTE. When I compile and run it will not work properly. It opens Scriptomatic for a second instance. Edit: Tried newest version with same results. BTW Thanks SvenP for such a wonderful script. Thanks, JS Edited July 24, 2006 by JSThePatriot AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
lordofthestrings Posted April 25, 2007 Share Posted April 25, 2007 amazing piece of work... had to reply to this thread to thank the convertor of this script.. Link to comment Share on other sites More sharing options...
ChrisL Posted May 28, 2007 Share Posted May 28, 2007 On line 450 in the runscript() function it should be this $strCmdLine = @AutoItExe & " /AutoIt3ExecuteScript " & $strTmpName When ran from scite uncompiled there was no issue but when compiled all that happened was another instance of scriptomatic was launched. [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
jefhal Posted May 28, 2007 Share Posted May 28, 2007 On line 450 in the runscript() function it should be this $strCmdLine = @AutoItExe & " /AutoIt3ExecuteScript " & $strTmpNameWhen ran from scite uncompiled there was no issue but when compiled all that happened was another instance of scriptomatic was launched.Thanks for finding that glitch ChrisL. I've always wondered why AutoITScriptomatic launched multiple times if one instance was open and I tried to launch any other AutoIt script from Scite. ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
Thunder-man Posted June 14, 2007 Share Posted June 14, 2007 Wow this is great THX for this. I am of use WMI only are to 2 days. With WMI Code Creator v1.0 from Microsoft. But the output is *.vbs Now I can understand it a little bit better... Link to comment Share on other sites More sharing options...
Sundance Posted July 24, 2007 Share Posted July 24, 2007 Hiho, when i try to choose a class i get the following error. Regardless which class a select:$objClass = $objWMIService.Get($strSelectedClass)$objClass = $objWMIService.Get($strSelectedClass)^ERRORError: The requested action with this object has failed.I'am using AutoIt 3.2.4.0As rbhkamal posted i get the same error and don't know how to solve... (got the fixed version)Some hints for me? Link to comment Share on other sites More sharing options...
lordofthestrings Posted July 25, 2007 Share Posted July 25, 2007 this error does sounds like a problem with $StrSelectedClass. (99% Sure it's not a problem with $ObjWMIService) post the complete resulting WMI Code you try.. I'll have a swing at it.. Link to comment Share on other sites More sharing options...
Sundance Posted July 25, 2007 Share Posted July 25, 2007 (edited) Thx for the reply lordofthestrings. I have no WMI code yet. I start the app and wait for the WMI namespaces to read out. Then i want to select a wmi class. When i choose one of the 5 classes i see, the app exits with the shown error code.... When i insert a messagebox before the line of error it shows me the right wmi class. Can you start the script when you compile it with the new autoit release? Edited July 25, 2007 by Sundance Link to comment Share on other sites More sharing options...
lordofthestrings Posted July 25, 2007 Share Posted July 25, 2007 well there you might have your problem... Some classes in the CIMV2 Namespace require admin rights, are you sure you have this? you should see about 300 Classes in the list.. I select for example Win32_PROCESS and I put it in HTML Output.. This works fine for me when I run the code.. expandcollapse popup; Generated by AutoIt Scriptomatic $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colItems = "" $strComputer = "localhost" $Output="" $Output = $Output & '<html><head><title>Scriptomatic HTML Output</title></head><body> <style>table {font-size: 10pt; font-family: arial;} th {background-color: buttonface; font-decoration: bold;} </style><table BORDER="1"><tr><th>Property</th><th>Value</th></tr>' $Output = $Output & '<tr bgcolor="yellow"><td>' & "Computer</td><td> " & $strComputer & "</td></tr>" & @CRLF $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Process", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) then For $objItem In $colItems $Output = $Output & "<tr><td>Caption</td><td> " & $objItem.Caption & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>CommandLine</td><td> " & $objItem.CommandLine & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>CreationClassName</td><td> " & $objItem.CreationClassName & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>CreationDate</td><td> " & WMIDateStringToDate($objItem.CreationDate) & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>CSCreationClassName</td><td> " & $objItem.CSCreationClassName & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>CSName</td><td> " & $objItem.CSName & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>Description</td><td> " & $objItem.Description & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>ExecutablePath</td><td> " & $objItem.ExecutablePath & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>ExecutionState</td><td> " & $objItem.ExecutionState & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>Handle</td><td> " & $objItem.Handle & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>HandleCount</td><td> " & $objItem.HandleCount & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>InstallDate</td><td> " & WMIDateStringToDate($objItem.InstallDate) & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>KernelModeTime</td><td> " & $objItem.KernelModeTime & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>MaximumWorkingSetSize</td><td> " & $objItem.MaximumWorkingSetSize & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>MinimumWorkingSetSize</td><td> " & $objItem.MinimumWorkingSetSize & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>Name</td><td> " & $objItem.Name & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>OSCreationClassName</td><td> " & $objItem.OSCreationClassName & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>OSName</td><td> " & $objItem.OSName & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>OtherOperationCount</td><td> " & $objItem.OtherOperationCount & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>OtherTransferCount</td><td> " & $objItem.OtherTransferCount & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>PageFaults</td><td> " & $objItem.PageFaults & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>PageFileUsage</td><td> " & $objItem.PageFileUsage & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>ParentProcessId</td><td> " & $objItem.ParentProcessId & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>PeakPageFileUsage</td><td> " & $objItem.PeakPageFileUsage & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>PeakVirtualSize</td><td> " & $objItem.PeakVirtualSize & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>PeakWorkingSetSize</td><td> " & $objItem.PeakWorkingSetSize & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>Priority</td><td> " & $objItem.Priority & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>PrivatePageCount</td><td> " & $objItem.PrivatePageCount & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>ProcessId</td><td> " & $objItem.ProcessId & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>QuotaNonPagedPoolUsage</td><td> " & $objItem.QuotaNonPagedPoolUsage & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>QuotaPagedPoolUsage</td><td> " & $objItem.QuotaPagedPoolUsage & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>QuotaPeakNonPagedPoolUsage</td><td> " & $objItem.QuotaPeakNonPagedPoolUsage & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>QuotaPeakPagedPoolUsage</td><td> " & $objItem.QuotaPeakPagedPoolUsage & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>ReadOperationCount</td><td> " & $objItem.ReadOperationCount & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>ReadTransferCount</td><td> " & $objItem.ReadTransferCount & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>SessionId</td><td> " & $objItem.SessionId & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>Status</td><td> " & $objItem.Status & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>TerminationDate</td><td> " & WMIDateStringToDate($objItem.TerminationDate) & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>ThreadCount</td><td> " & $objItem.ThreadCount & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>UserModeTime</td><td> " & $objItem.UserModeTime & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>VirtualSize</td><td> " & $objItem.VirtualSize & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>WindowsVersion</td><td> " & $objItem.WindowsVersion & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>WorkingSetSize</td><td> " & $objItem.WorkingSetSize & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>WriteOperationCount</td><td> " & $objItem.WriteOperationCount & "</td></tr>" & @CRLF $Output = $Output & "<tr><td>WriteTransferCount</td><td> " & $objItem.WriteTransferCount & "</td></tr>" & @CRLF Next FileWrite(@TempDir & "\Win32_Process.HTML", $Output ) Run(@Comspec & " /c start " & @TempDir & "\Win32_Process.HTML" ) Else Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_Process" ) Endif Func WMIDateStringToDate($dtmDate) Return (StringMid($dtmDate, 5, 2) & "/" & _ StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _ & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate,13, 2)) EndFunc Link to comment Share on other sites More sharing options...
lordofthestrings Posted July 25, 2007 Share Posted July 25, 2007 I was able to reproduce your error.. you should select only namespaces that you know exist.. (Root\cimv2 for example) If you select root\wmi, you might get this error.. Link to comment Share on other sites More sharing options...
Sundance Posted July 25, 2007 Share Posted July 25, 2007 Hi, i have a very funny behaviour of scriptomatic. When i select root\CIMV2, scriptomatic show me 5 WMI classes. When i select the same Namespace (root\CIMV2) under WMI Code Creator it shows me 406 classes. When i select root\DEFAULT under WMI Code Creator i get those 5 classes. There seems to be a little problem with scriptomatic to get the class(-names) right. On this machine i have admin rights, this can't be the problem. I've tried the same thing on a different machine with the same result. All machines are in a domain. But there are no known policies which harm the wmi service. Other WMI tools are working as they should... Link to comment Share on other sites More sharing options...
Sundance Posted July 25, 2007 Share Posted July 25, 2007 (edited) I will additionally try scriptomatic at home. Seeing if it runs there and try to find out where is the difference.... PS: i run the autoitscript you posted and it runs without any prob. at line 332 $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & @COMPUTERNAME & $g_strCurrentNamespace) then i select the \root\default namespace and the class Win32_Process. This works! I get the autoitscript. Very funny... Edited July 25, 2007 by Sundance Link to comment Share on other sites More sharing options...
sstanfie Posted October 4, 2007 Share Posted October 4, 2007 Is scriptomatic going to be updated anytime soon? Thank you. Link to comment Share on other sites More sharing options...
Paulchen Posted May 23, 2008 Share Posted May 23, 2008 (edited) after autoit 3.2.12 you must include #include <WindowsConstants.au3> Edited May 23, 2008 by Paulchen Link to comment Share on other sites More sharing options...
DK12000 Posted July 16, 2008 Share Posted July 16, 2008 This. is. so. awesome. Works perfectly for XP x64 muttley Thank you Link to comment Share on other sites More sharing options...
Micoman Posted July 24, 2008 Share Posted July 24, 2008 Thanks for this nice script its helps a lot. muttley after autoit 3.2.12 you must include#include <WindowsConstants.au3>Thanks Paulchen Link to comment Share on other sites More sharing options...
shawniverson Posted July 26, 2008 Share Posted July 26, 2008 (edited) This will work in AutoIt 3.2.x if you fetch the deprecated GuiConstants.au3 include from AutoIt 3.1.x too... -- Shawn Edited July 26, 2008 by shawniverson Link to comment Share on other sites More sharing options...
paulpmeier Posted August 28, 2008 Share Posted August 28, 2008 Very usefull. Thank you. Please add in the code #include <WindowsConstants.au3> for new AutoIt versions. Paul Link to comment Share on other sites More sharing options...
cherdeg Posted October 30, 2008 Share Posted October 30, 2008 Hey SvenP, what about changing scriptomatic so correct wmi-code for accessing remote hosts is generated? If a hostname is entered...$strComputer = "localhost" $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\ROOT\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Processor", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)oÝ÷ ÚÈhºW©àzÚºÚ"µÍÌÍÜÝÛÛ]H ][ÝÜ[[ÝZÜÝ ][ÝÂÌÍÕÙH ][ÝÕÙ][ÝÂÌÍÔÜÝÛÜH ][ÝÔÜÝÛÜ ][ÝÂÌÍÛØÕØ[SØØ]ÜHØÜX]J ][ÝÕØ[TØÜ[ËÕØ[SØØ]Ü][ÝÊBÌÍÛØÓRTÙXÙHH ÌÍÛØÕØ[SØØ]ÜÛÛXÝÙ ÌÍÜÝÛÛ] ][ÝÜÛÝ ÌLÐÒSU][ÝË ÌÍÕÙ ÌÍÔÜÝÛÜ BÌÍØÛÛ][ÈH ÌÍÛØÓRTÙXÙK^XÔ]YJ ][ÝÔÑSPÕ ÓHÚ[ÌÔØÙÜÛÜ][ÝË ][ÝÕÔS ][ÝË ÌÍÝØ[QYÔ][[YYX][H È ÌÍÝØ[QYÑÜØÛJ Right? 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