Spooky Posted December 30, 2005 Posted December 30, 2005 (edited) I am using beta 3.1.1.98 - is this not the correct version?P.S...nevermind, uninstalled auitoit then completly re-installed everything - now it works.I also get that error if I do not run it with atleast the required beta version of AutoIt.Using beta starts without error. Edited December 30, 2005 by Spooky
giogio Posted December 30, 2005 Posted December 30, 2005 the Scriptomatic.au3 start correctly, but after waiting the list of wmi namespace and wmi class, its do not show me any choises, the microsoft Scriptomatic show a list of choise to select. do i have to add some dll or other stuff? By Franco
MHz Posted December 31, 2005 Posted December 31, 2005 the Scriptomatic.au3 start correctly, but after waiting the list of wmi namespace and wmi class, its do not show me any choises, the microsoft Scriptomatic show a list of choise to select.do i have to add some dll or other stuff?ByFrancoNo additional Dlls. It should work similar to the Microsoft version. Once WMI has loaded, then you should be able to use the combo's to select your choice of script. Working fine here with XP Pro and latest AutoIt Beta.
giogio Posted December 31, 2005 Posted December 31, 2005 win 2000 sp4, last scriptomatic, last autoscript beta. if i put manualy the choise and select one of the output choise then i get the script, this is the only way to get the script. many thanks for your answer. By Franco
Developers Jos Posted December 31, 2005 Developers Posted December 31, 2005 win 2000 sp4, last scriptomatic, last autoscript beta.if i put manualy the choise and select one of the output choise then i get the script, this is the only way to get the script.many thanks for your answer.ByFrancoThink its fixed in this version,....... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
giogio Posted January 3, 2006 Posted January 3, 2006 YOU ARE A GIANT. MANY THANKS FOR YOUR ATTENTION FRANCO
PsaltyDS Posted February 14, 2006 Posted February 14, 2006 (edited) Think its fixed in this version,....... Scriptomatic rocks (but you knew that)! I'm having a little bit of trouble with it, though. I run Scriptomatic on my XP desktop, compile the script and post it on a CIFS share, from whence I run the compiled script on various servers (2000 SP4 and 2003 SP1). Execution appears to be sensitive to OS Version. I use the WMISource, Win32_TapeDrive object to check on available tape drive identity, with Dialog selected. On the XP box (which has no tape drive) I get no output or errors at all, including no pop up dialogs, though I was expecting ""No WMI Objects Found for class: Win32_TapeDrive". On a Win2KAS server with a tape, same thing, I get nothing (no errors, no messages). On a Win2003 server, it works perfectly. Using the Win32_BIOS object instead, the XP and 2003 boxes both work, but the 2000 box gets an error: Line 0 (File "G:\MyFolder\WMI_BIOS.exe"): $strBIOSVersion = $objItem.BIOSVersion(0) $strBIOSVersion = $objItem.BIOSVersion(0)^ ERROR Error: The requested action with this object has failed. Are these WMI COM object calls typicaly so dependant on OS Version? It occurs to me that since Scriptomatic itself is running under XP when generating the script, that it is making XP or XP/2003 specific calls in its generated code. I'd like to crank out some scripts that will give me WMI info on 2000 or 2003 servers without modification. Is this possible? Where should I be looking for the OS dependancy in the script? Update: I installed AutoIT 3.1.1, plus Beta 106, plus SciTE and update, plus Scriptomatic on one of the 2000 servers, and then ran Scriptomatic from there to generate a WMI - Win32_TapeDrive script. Same results. Edited February 14, 2006 by PsaltyDS 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
rambo3889 Posted February 14, 2006 Posted February 14, 2006 Doesnt work for me ;( My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight!
MadBoy Posted March 31, 2006 Posted March 31, 2006 All works fine until i choose WMI Namespace diffrent then: root\CIMV2, then choosing anything on right makes scriptomatic to crash with following error: C:\WMI.au3 (333) : ==> The requested action with this object has failed.: $objClass = $objWMIService.Get($strSelectedClass) $objClass = $objWMIService.Get($strSelectedClass)^ ERROR @rambo3889 - try the fixed version from JDEB .. you can find it in his post. It works somewhat My little company: Evotec (PL version: Evotec)
Lee Evans Posted June 8, 2006 Posted June 8, 2006 PSANDU.RO Can you post the .au3 rather than the exe then I can add the changes for win2000 for the dropdowns? Or did you compile the last .au3 that was posted? Thanks
GaryFrost Posted June 8, 2006 Posted June 8, 2006 Source: expandcollapse popupOpt('TrayMenuMode', 1) TraySetToolTip ('Scriptomatic') DllCall('uxtheme.dll', 'none', 'SetThemeAppProperties', 'int', 0) #Include <GuiConstants.au3> #Include <Array.au3> #Include <GuiCombo.au3> $maingui = GUICreate('WMI', 556, 700, -1, -1, $ws_sysmenu) GUICtrlCreateLabel('WMI Namespace', 5, 5) GUICtrlCreateLabel('WMI Classes', 480, 5) $wmiok = GUICtrlCreateButton('RUN', 250, 25, 50, 21, $bs_flat) $namespacecombo = GUICtrlCreateCombo('', 5, 25, 240, -1, $lbs_standard) $wmi_classes = GUICtrlCreateCombo('', 305, 25, 240, -1, $lbs_standard) GUICtrlSetState($namespacecombo, $gui_focus) GUICtrlSetState($namespacecombo, $gui_disable) GUICtrlSetState($wmi_classes, $gui_disable) $dynamic = GUICtrlCreateCheckbox('Dynamic Classes', 268, 5, -1, 17) GUICtrlSetState($dynamic, $gui_checked) $edit = GUICtrlCreateEdit('', 5, 60, 540, 610, $es_autovscroll + $es_autohscroll) GUISetState() $tmp = StringSplit(WMI_Namespace(), @CRLF, 1) For $temp = 1 To $tmp[0] GUICtrlSetData($namespacecombo, $tmp[$temp]) Next GUICtrlSetState($namespacecombo, $gui_enable) $setnamespace = '' $disnamespace = 'Disable' While 1 $msg = GUIGetMsg() If $msg = $gui_event_close Then ExitLoop If $setnamespace <> GUICtrlRead($namespacecombo) And $disnamespace = 'Enable' Then $setnamespace = GUICtrlRead($namespacecombo) $disnamespace = 'Disable' GUICtrlSetState($wmi_classes, $gui_disable) _GUICtrlComboResetContent ($wmi_classes) EndIf If $msg = $namespacecombo And GUICtrlRead($namespacecombo) <> '' Then $setnamespace = GUICtrlRead($namespacecombo) _GUICtrlComboResetContent ($wmi_classes) WMI_Classes(GUICtrlRead($namespacecombo)) EndIf GUICtrlSetTip($namespacecombo, GUICtrlRead($namespacecombo)) GUICtrlSetTip($wmi_classes, GUICtrlRead($wmi_classes)) If $msg = $wmi_classes Then Source(GUICtrlRead($namespacecombo), GUICtrlRead($wmi_classes)) If $msg = $wmiok Then FileDelete(@TempDir & '\WMI.au3') $file = FileOpen(@TempDir & '\WMI.au3', 2) FileWrite($file, GUICtrlRead($edit)) FileClose($file) If Not FileExists(@TempDir & '\AutoIt3.exe') Then FileInstall('AutoIt3.exe', @TempDir & '\AutoIt3.exe', 1) RunWait(@TempDir & '\AutoIt3.exe' & " " & @TempDir & '\WMI.au3') EndIf WEnd Func WMI_Namespace($namespace = 'root', $wmimain = True, $computer = 'localhost') $objwmiservice = ObjGet ('winmgmts:\\' & $computer & '\' & $namespace) $wmi_namespace = '' If Not @error Then $colnamespaces = $objWMIService.InstancesOf ('__NAMESPACE') For $objnamespace In $colnamespaces $wmi_namespace = $wmi_namespace & $namespace & '\' & $objnamespace.name & @CRLF $wmi_namespace = $wmi_namespace & WMI_Namespace($namespace & '\' & $objnamespace.name, False) Next If Not $wmimain Then Return $wmi_namespace EndIf If $wmimain Then $wmi_namespace = 'root' & @CRLF & StringTrimRight($wmi_namespace, 2) EndIf Return $wmi_namespace EndFunc ;==>WMI_Namespace Func WMI_Classes($g_strcurrentnamespace) $strclassescombo = '' $objclassdictionary = ObjCreate ('Scripting.Dictionary') $objqualifierdictionary = ObjCreate ('Scripting.Dictionary') $objwmiservice = ObjGet ('winmgmts:\\localhost\' & $g_strcurrentnamespace) If Not @error Then For $objclass in $objWMIService.SubclassesOf () For $objqualifier In $objClass.Qualifiers_ () $objQualifierDictionary.Add (StringLower($objqualifier.name), '') Next Select Case GUICtrlRead($dynamic) = 1 If $objQualifierDictionary.Exists ('dynamic') Then $objClassDictionary.Add ($objclass.path_.class, '') EndIf Case Else $objClassDictionary.Add ($objclass.path_.class, '') EndSelect $objqualifierdictionary.removeall Next $objqualifierdictionary = '' If $objclassdictionary.count Then $strclassescombo = '' For $strwmiclass in $objclassdictionary $strclassescombo = $strclassescombo & $strwmiclass & @CRLF Next EndIf EndIf If @error Or $objclassdictionary.count = 0 Then $strclassescombo = '' EndIf $classes = '' $objclassdictionary = '' If StringRight($strclassescombo, 2) = @CRLF Then $strclassescombo = StringTrimRight($strclassescombo, 2) $classes = StringSplit($strclassescombo, @CRLF, 1) If IsArray($classes) Then _ArraySort($classes, 0, 1) For $temp = 1 To $classes[0] GUICtrlSetData($wmi_classes, $classes[$temp]) Next GUICtrlSetState($wmi_classes, $gui_enable) $disnamespace = 'Enable' EndIf Select Case $classes[0] - 0 = 0 _GUICtrlComboSetMinVisible ($wmi_classes, 0) Case $classes[0] - 0 < 25 And $classes[0] - 0 > 0 _GUICtrlComboSetMinVisible ($wmi_classes, $classes[0] - 0) Case Else _GUICtrlComboSetMinVisible ($wmi_classes, 25) EndSelect EndFunc ;==>WMI_Classes Func Source($namespace_wmi, $classes_wmi) GUICtrlSetData($edit, '') $objwmiservice = ObjGet ("winmgmts:{impersonationLevel=impersonate}!\\localhost\" & $namespace_wmi) $objclass = $objWMIService.Get ($classes_wmi) If IsObj ($objclass) Then $source = '' $source &= "Opt('TrayMenuMode',1)" & @CRLF $source &= "TraySetToolTip ('" & $classes_wmi & "')" & @CRLF $source &= @CRLF $source &= "const $wbemFlagReturnImmediately = 0x10" & @CRLF $source &= "const $wbemFlagForwardOnly = 0x20" & @CRLF $source &= "$colItems = ''" & @CRLF $source &= "$output=''" & @CRLF $source &= "$strComputer = 'localhost'" & @CRLF $source &= "$objWMIService = ObjGet('winmgmts:\\' & $strComputer & '\" & $namespace_wmi & "')" & @CRLF $source &= "$colItems = $objWMIService.ExecQuery('SELECT * FROM " & $classes_wmi & "', 'WQL', _" & @CRLF & Chr(9) & Chr(9) & "$wbemFlagReturnImmediately + $wbemFlagForwardOnly)" & @CRLF $source &= @CRLF $source &= "If IsObj($colItems) Then" & @CRLF $source &= " For $objItem In $colItems" & @CRLF For $objproperty in $objClass.Properties_ () Select Case $objproperty.isarray = True $source &= " $output&='" & $objproperty.name & ":' & $objItem." & $objproperty.name & "(0) & @CRLF" & @CRLF Case $objproperty.cimtype = 11 $source &= " $output&='" & $objproperty.name & ":' & Not(Not($objItem." & $objproperty.name & ")) & @CRLF" & @CRLF Case $objproperty.cimtype = 8 $source &= " $output&='" & $objproperty.name & ":' & String($objItem." & $objproperty.name & ") & @CRLF" & @CRLF Case $objproperty.cimtype = 101 $source &= " $output&='" & $objproperty.name & ":' & WMIDateStringToDate($objItem." & $objproperty.name & ") & @CRLF" & @CRLF Case $objproperty.cimtype = 13 Case Else $source &= " $output&='" & $objproperty.name & ":' & $objItem." & $objproperty.name & " & @CRLF" & @CRLF EndSelect Next EndIf $source &= " If Msgbox(1,'WMI Output',$Output) = 2 Then ExitLoop" & @CRLF $source &= " $output=''" & @CRLF $source &= " Next" & @CRLF $source &= "EndIf" & @CRLF $source &= @CRLF $source &= "Func WMIDateStringToDate($dtmDate)" & @CRLF $source &= " Return (StringMid($dtmDate, 5, 2) & '/' & _" & @CRLF $source &= " StringMid($dtmDate, 7, 2) & '/' & StringLeft($dtmDate, 4) _" & @CRLF $source &= " & ' ' & StringMid($dtmDate, 9, 2) & ':' & StringMid($dtmDate, 11, 2) & ':' & StringMid($dtmDate,13, 2))" & @CRLF $source &= "EndFunc" & @CRLF GUICtrlSetData($edit, $source) EndFunc ;==>Source oÝ÷ Ûú®¢×¬º²×!jx"ë¢f®¶s` bæ÷BfÆTW7G2FV×F"fײb33²b3#´WFôC2æWRb33²FVâfÆTç7FÆÂb33´WFôC2æWRb33²ÂFV×F"fײb33²b3#´WFôC2æWRb33²Â 'VåvBFV×F"fײb33²b3#´WFôC2æWRb33²fײgV÷C²gV÷C²fײFV×F"fײb33²b3#µtÔæS2b33² oÝ÷ ÚÚºÚ"µÍBT[ØZ] ÌÎNÉ][ÝÉÌÎNÈ [È]]Ò]^H [È ÌÎNÉ][ÝÉÌÎNÈ [È ÌÎNÈÐ]]Ò]Ñ^XÝ]TØÜ ÌÎNÈ [È ][ÝÈ ][ÝÈ [È[ [È ÌÎNÉÌLÕÓRK]LÉÌÎNÊB SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Lee Evans Posted June 9, 2006 Posted June 9, 2006 Sorry I may be really stupid but if I try to copy and paste the code into a txt file it loses all of the lines. Could you just attach the .au3 file so that I can download it. Thanks
bluebearr Posted June 25, 2006 Posted June 25, 2006 Excellent work! I used the script from the first page and had to edit several lines before it would work. I'm using beta 3.1.1.127. Changed lines 346 to 348 from this: $strScriptCode = $strScriptCode & "$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=" & Chr(34) & "1" & Chr(34) & "><tr><th>Property</th><th>Value</th></tr>'" & @CRLF to this: $strScriptCode = $strScriptCode & "$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=" & Chr(34) & "1" & Chr(34) & "><tr><th>Property</th><th>Value</th></tr>'" & @CRLF And changed lines 507-509 from this: $strWMISourceName = InputBox("Set WMI Repository Source",_ "Please enter the computer whose WMI repository you want to read from: ",_ $g_strWMISource) to this (added space before line continuation _): $strWMISourceName = InputBox("Set WMI Repository Source", _ "Please enter the computer whose WMI repository you want to read from: ", _ $g_strWMISource) Then it worked. BlueBearrOddly enough, this is what I do for fun.
ptrex Posted June 25, 2006 Posted June 25, 2006 @psandu.roI have tested the tenewed code. But I have my doubts about the integrity of the code.I have run the original VBscript version selecting Root/WMI "MSStorageDriver_ATAPISmartData" And compared this against the new code.This not exacty the same !!This is the original output :Active: -1Checksum: 244ErrorLogCapability: 1ExtendedPollTimeInMinutes: 31InstanceName: IDE\DiskST94019A________________________________3.09____\5&13b9a31c&0&0.0.0_0Length: 512OfflineCollectCapability: 91OfflineCollectionStatus: 130Reserved: 0,0,0,0,0,0,0,0,0,0,0,0SelfTestStatus: 0ShortPollTimeInMinutes: 1SmartCapability: 3TotalTime: 426VendorSpecific: 10,0,1,15,0,67,60,118,211,207,3,0,0,0,3,3,0,99,99,0,0,0,0,0,0,0,4,50,0,100,100,148,1,0,0,0,0,0,5,51,0,100,100,0,0,0,0,0,0,0,7,15,0,78,60,76,129,199,3,0,0,0,9,50,0,93,93,205,24,0,0,0,0,0,10,19,0,100,100,0,0,0,0,0,0,0,12,50,0,100,100,21,2,0,0,0,0,0,192,50,0,100,100,141,0,0,0,0,0,0,193,50,0,1,1,12,69,3,0,0,0,0,194,34,0,41,55,41,0,0,0,0,0,0,195,26,0,67,60,118,211,207,3,0,0,0,197,18,0,100,100,0,0,0,0,0,0,0,198,16,0,100,100,0,0,0,0,0,0,0,199,62,0,200,200,0,0,0,0,0,0,0,200,0,0,100,253,0,0,0,0,0,0,0,202,50,0,100,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0VendorSpecific2: 0VendorSpecific3: 0VendorSpecific4: 223,199,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,236,156,136,136,8,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,124,1,130,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0This is the output of the new code :Active: TrueChecksum: 244ErrorLogCapability: 1ExtendedPollTimeInMinutes: 31InstanceName: IDE\DiskST94019A________________________________3.09____\5&13b9a31c&0&0.0.0_0Length: 512OfflineCollectCapability: 91OfflineCollectionStatus: 130Reserved: 0SelfTestStatus: 0ShortPollTimeInMinutes: 1SmartCapability: 3TotalTime: 426VendorSpecific: 10VendorSpecific2: 0VendorSpecific3: 0VendorSpecific4: 223Also If you compare the original source code of SvenP which was 21 Kb large, the new code is only 7 Kb large ?Isn' t something that was skipped.I think it would be better to get the original code repaired. Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
Administrators Jon Posted July 13, 2006 Administrators Posted July 13, 2006 Added a fixed version into the first post. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
WTS Posted July 13, 2006 Posted July 13, 2006 (edited) thanks jon.This is the AutoIt's version of Microsoft Scriptomatic tool. Which took me some hours to rewrite (yes, yes, I'm not such a fast script writer). me too.btw nice job Edited July 13, 2006 by WTS
rbhkamal Posted July 13, 2006 Posted July 13, 2006 (edited) Added a fixed version into the first post.it's crashing on me: 1- Set the WMI Name space to: "root\WMI" 2- when selecting any WMI Class I get this error: >"C:\Program Files\AutoIt3\SciTE\CompileAU3\CompileAU3.exe" /run /beta /ErrorStdOut /in "C:\Documents and Settings\****\Desktop\scriptomatic.au3" /autoit3dir "C:\Program Files\AutoIt3\beta" /UserParams >Running AU3Check (1.54.1.0) params: from:C:\Program Files\AutoIt3\beta +>AU3Check ended.rc:0 >Running:(3.1.1.129):C:\Program Files\AutoIt3\beta\autoit3.exe "C:\Documents and Settings\*****\Desktop\scriptomatic.au3" C:\Documents and Settings\****\Desktop\scriptomatic.au3 (333) : ==> The requested action with this object has failed.: $objClass = $objWMIService.Get($strSelectedClass) $objClass = $objWMIService.Get($strSelectedClass)^ ERROR +>AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 69.750 Edited July 13, 2006 by rbhkamal "When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix
SandelPerieanu Posted July 13, 2006 Posted July 13, 2006 (edited) Thanks for error. Try now. Edited July 19, 2006 by psandu.ro
WTS Posted July 13, 2006 Posted July 13, 2006 Thanks for error.Try now.Error: RunWait(@TempDir & '\AutoIt3.exe' & " " & @TempDir & '\WMI.au3') I don't have autoit in the temp directory..
SandelPerieanu Posted July 13, 2006 Posted July 13, 2006 copy your C:\Program Files\.....\Autoit3.exe into current directory and retry If Not FileExists(@TempDir & '\AutoIt3.exe') Then FileInstall('AutoIt3.exe', @TempDir & '\AutoIt3.exe', 1) It's for compiled version.
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