Chimaera Posted February 13, 2015 Share Posted February 13, 2015 (edited) Im working on something with services and it fails on win XP- 7 and only seems to work with Win8 Code here which is based on some code by gil900 expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Version=Beta #AutoIt3Wrapper_Outfile=services.exe #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Array.au3> Global $sRemoveServices = 'AdobeARMservice|AeLookupSvc|AntiVirSchedulerService|AntiVirService|Appinfo|AudioEndpointBuilder|AudioSrv|Avira.OE.ServiceHost|BFE|BITS|Browser|CryptSvc|DcomLaunch|Dhcp|Dnscache|DPS|EventLog|EventSystem|fdPHost|FDResPub|gpsvc|HomeGroupListener|HomeGroupProvider|iphlpsvc|KeyIso|LanmanServer|LanmanWorkstation|lmhosts|MMCSS|MpsSvc|MSDTC|Netman|netprofm|NlaSvc|nsi|p2pimsvc|p2psvc|PlugPlay|PNRPsvc|Power|ProfSvc|ProtectedStorage|RpcEptMapper|RpcSs|SamSs|Schedule|SENS|ShellHWDetection|Spooler|sppsvc|sppuinotify|SSDPSRV|SysMain|Themes|TrkWks|TrustedInstaller|upnphost|UxSms|VSS|WdiServiceHost|WdiSystemHost|WinDefend|WinHttpAutoProxySvc|Winmgmt|WMPNetworkSvc|WPDBusEnum|wscsvc|WSearch|wuauserv|wudfsvc' Global $aRemoveServices = StringSplit($sRemoveServices, "|") ;~ _ArrayDisplay($aRemoveServices, 'Total Services') ;( 42) Global $test = _RetrieveRunningServices() _ArrayDisplay($test) Global $sString = _ArrayToString($test, ",", Default, Default, @CRLF) ; Make into .csv format Beta needed FileWrite(@ScriptDir & '\Services Logs\' & @OSVersion & ' ' & @UserName & ' ' & @MDAY & ' ' & @MON & ' ' & @MIN & ' ' & @SEC & '.csv', $sString) MsgBox(64, 'Finished', 'CSV Created', 2) ; #FUNCTION# ==================================================================================================================== ; Name ..........: _RetrieveRunningServices ; Description ...: Get all running services with "Display name" and "Short name" in array ; Syntax ........: _RetrieveRunningServices([$Sort = 0]) ; Parameters ....: $Sort - [optional] If $sort = 1 then the function will sort the list by "Display name" ; Return values .: Array: ; If error then the array will be empty and index [0][0] in the array will be = 0 ; If not error then the array will not be empty and [0][0] will be greater than 0. ; [0][0] = number of all running services. ; Author ........: gil900 ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: yes ; =============================================================================================================================== Func _RetrieveRunningServices($Sort = 1) Local $Output[1][2] , $iPid $Output[0][0] = 0 $iPid = Run(@ComSpec & " /c sc query", @SystemDir, @SW_HIDE, 2) If $iPid > 0 Then ProcessWaitClose($iPid) Local $StdoutRead = StdoutRead($iPid) If Not @error Then Local $add = 0 , $n = 1 , $aStdoutRead , $tmp $aStdoutRead = StringSplit($StdoutRead,@CRLF,1) For $a = 1 To $aStdoutRead[0] $tmp = StringLeft($aStdoutRead[$a],1) If $tmp <> " " And $tmp <> "" Then $tmp = StringSplit($aStdoutRead[$a],": ",1) If $tmp[0] = 2 Then If $add = 0 Then ReDim $Output[$n+1][2] $Output[$n][0] = $tmp[$tmp[0]] $add = 1 Else $Output[$n][1] = $tmp[$tmp[0]] $Output[0][0] = $n $n += 1 $add = 0 EndIf EndIf EndIf Next If $Sort = 1 And $Output[0][0] > 0 Then _ArraySort($Output, 0, 1, 0, 1) Else MsgBox(64, 'Error Detected', @error) EndIf Else MsgBox(64, 'Run Error Detected', @error) EndIf _ArrayDelete($Output,$aRemoveServices) Return $Output EndFunc >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "N:Servicesget services.au3" /UserParams +>12:36:14 Starting AutoIt3Wrapper v.2.2.0.3 SciTE v.3.4.1.0 Keyboard:00000809 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0409) +> SciTEDir => C:Program Files (x86)AutoIt3SciTE UserDir => C:Users****AppDataLocalAutoIt v3SciTEAutoIt3Wrapper SCITE_USERHOME => C:Users****AppDataLocalAutoIt v3SciTE >Running AU3Check (3.3.13.19) params:-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 from:C:\Program Files (x86)\AutoIt3\Beta\ input:N:Servicesget services.au3 +>12:36:14 AU3Check ended.rc:0 >Running:(3.3.13.19):C:\Program Files (x86)\AutoIt3\Beta\autoit3.exe "N:Servicesget services.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop !>12:36:16 AutoIt3.exe ended.rc:-1073741819 +>12:36:16 AutoIt3Wrapper Finished. >Exit code: 3221225477 Time: 2.386 Any suggestions to whats causing this? Edited February 13, 2015 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
UEZ Posted February 13, 2015 Share Posted February 13, 2015 (edited) For me it runs properly without any problem!+>13:42:36 Starting AutoIt3Wrapper v.3.3.12.0 SciTE v.3.4.4.0 Keyboard:00000407 OS:WIN_81/ CPU:X64 OS:X64 Environment(Language:0409) ... >Running AU3Check (3.3.13.19) params:-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 from:C:\Program Files (x86)\AutoIt3\Beta input:C:\Temp\Test28.au3 +>13:42:36 AU3Check ended.rc:0 Br,UEZ Edited February 13, 2015 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
jaberwacky Posted February 13, 2015 Share Posted February 13, 2015 When I remove "#AutoIt3Wrapper_Version=Beta" and run with 3.3.12.0 I get this error message: "C:\Program Files (x86)\AutoIt3\Include\Array.au3" (414) : ==> Variable subscript badly formatted.: ReDim $avArray[$iDim_1 - $vRange[0] + 1][$iDim_2 + 1] ReDim $avArray[^ ERROR Don't know what that's about. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
Chimaera Posted February 13, 2015 Author Share Posted February 13, 2015 (edited) When I remove "#AutoIt3Wrapper_Version=Beta" and run with 3.3.12.0 I get this error message: "C:\Program Files (x86)\AutoIt3\Include\Array.au3" (414) : ==> Variable subscript badly formatted.: ReDim $avArray[$iDim_1 - $vRange[0] + 1][$iDim_2 + 1] ReDim $avArray[^ ERROR Don't know what that's about. The Latest array to string requires beta to work (well i think thats the cause) Just tried hiding that part and i get the same Just commeneted out the ArrayDelete part that i added and it works, is there any issues with ArrayDelete and Beta? _ArrayDelete($Output,$aRemoveServices) Id added it to remove the known services from the list Edited February 13, 2015 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 13, 2015 Moderators Share Posted February 13, 2015 (edited) Chimaera, The Latest array to string requires beta to workIf the release and beta are installed correctly, they co-exist without problem and use their own includes - so that is unlikely to be the cause. The script you posted runs without problem for me under both 3.3.12.0 and 3.3.13.19. However, _ArrayDelete does not work as you seem to think. You appear to believe that passing an array of text strings ($aRemoveServices) as a parameter will somehow magically remove those strings from the $Output array. If you look at the Help file you will see that the second parameter should contain the index numbers of the elements to be removed - this can be a single numeric value, a string containing the index ranges, or an array holding the index numbers as you can see here:#include <Array.au3> ; Create array Global $aArray[4] = ["Zero", "One", "Two", "Three"] _ArrayDisplay($aArray, "Original", Default, 8) ; Create array of strings to remove Global $aRemoveItems[2] = ["One", "Three"] _ArrayDelete($aArray, $aRemoveItems) ; And it does not work _ArrayDisplay($aArray, "Modified?", Default, 8) ; Create a correct structured array of count + index numbers Global $aRemoveItems[3] = [2, 1, 3] ; Count, Element 1, element 3 _ArrayDelete($aArray, $aRemoveItems) ; And it does _ArrayDisplay($aArray, "And modified", Default, 8)I hope that helps. M23 Edited February 14, 2015 by Melba23 Typo Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Chimaera Posted February 13, 2015 Author Share Posted February 13, 2015 (edited) Ok i kinda understand that, problem i dont get is how do i do that array i have do i just add them up and give it the total etc Is it the fixed array we are talking about or the one it creates from the services? would it be $aRemoveItems[71] = [70, 1, 70] like that? Or is it going to be easier doing a For Next loop instead? Sorry for the wrong assumption about beta i was warned it was tricky so i assumed it would be that.. PS ive edited the title can you move it to general plz Edited February 13, 2015 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 13, 2015 Moderators Share Posted February 13, 2015 Chimaera,What are you trying to do to the array produced by the _RetrieveRunningServices function? Remove every element that matches an item in the $aRemoveServices array? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Chimaera Posted February 13, 2015 Author Share Posted February 13, 2015 (edited) Yes retrieve all the running services then remove all the standard windows ones that i put in the array at the top which gives me a list of running items that are NOT correct windows services Then i use the txt file to make a services changer program that i am working on Edited February 13, 2015 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Moderators Solution Melba23 Posted February 13, 2015 Moderators Solution Share Posted February 13, 2015 Chimaera,Then something like this should do the trick: Else MsgBox(64, 'Run Error Detected', @error) EndIf Local $iIndex ; Loop through the "to be removed" array For $i = 1 To $aRemoveServices[0] ; Look for the index of the item $iIndex = _ArraySearch($Output, $aRemoveServices[$i]) ; If found... If $iIndex <> -1 Then ; ...then remove it _ArrayDelete($Output, $iIndex) EndIf Next Return $Output EndFuncM23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2015 Share Posted February 14, 2015 (edited) I am glad that the code I wrote is useful for you and this error is not my fault. But I replaced this code to a new one some time ago: Func _RetrieveRunningServices2($Sort = 0) Local $Output[1][2], $iPid $Output[0][0] = 0 $iPid = Run(@ComSpec & " /c sc query", @SystemDir, @SW_HIDE, 2) If $iPid <= 0 Then Return $Output Local $StdoutRead,$tmp = TimerInit() Do If TimerDiff($tmp) > 15000 Then Return $Output ; just a fix for another potential bug/problem that the loop will never ends .. $StdoutRead &= StdoutRead($iPid) Until @error Local $add = 0, $n = 1, _ $aStdoutRead = StringSplit($StdoutRead, @CRLF, 1) For $a = 1 To $aStdoutRead[0] $tmp = StringLeft($aStdoutRead[$a], 1) If StringStripWS($tmp,3) = '' Then ContinueLoop $tmp = StringSplit($aStdoutRead[$a], ": ", 1) If $tmp[0] <> 2 Then ContinueLoop If $add = 0 Then ReDim $Output[$n + 1][2] $Output[$n][0] = $tmp[$tmp[0]] $add = 1 Else $Output[$n][1] = $tmp[$tmp[0]] $Output[0][0] = $n $n += 1 $add = 0 EndIf Next If $Sort And $Output[0][0] > 1 Then _ArraySort($Output, 0, 1, 0, 1) ; Sort by DisplayName Return $Output EndFunc ;==>_RetrieveRunningServices2 1) The reason you should use it is a >potential bug that fixed in this code.. 2) The second addition is that it return the full name of each service and for that it need to retun 2d array. 3) Note that this does not return an error if an error occurs. it returns an empty array in error event( It always returns array). So if $Output[0][0] is 0 then you should see it as error. $Output[0][0] is the number of the services in the array. Note that if you search in 2D array, then you need to search with Array2DSearch function (Instead of using _ArraySearch) My Array2DSearch function: Func Array2DSearch($aArray, $String, $Dimension, $StartIndex = 1, $EndIndex = "") Local $Output = -1, $a ;If IsArray($aArray) Then ; Local $a If $EndIndex = "" Then $EndIndex = UBound($aArray) - 1 If $StartIndex >= 0 And $StartIndex <= $EndIndex Then For $a = $StartIndex To $EndIndex If $aArray[$a][$Dimension] = $String Then $Output = $a ExitLoop EndIf Next EndIf ;EndIf Return $Output EndFunc ;==>Array2DSearch * Error event is when the output is -1 EDIT: Accidentally gave the wrong function (about array search). I fixed it now Edited February 14, 2015 by Guest Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 14, 2015 Moderators Share Posted February 14, 2015 gil900, Note that if you search in 2D array, then you need to search with Array2DSearch function (Instead of using _ArraySearch)Rubbish - why do you think there is a $iSubItem parameter? $iSubItem: [optional] Sub-index to search on in 2D arraysYou can search 2D arrays perfectly with _ArraySearch, as the second example in the Help file makes plain. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2015 Share Posted February 14, 2015 Oops,I did not notice about it ..This parameter're so far (this is the last parameter), that it also caused me me to miss it.I also knew that it will be easier for me to write my own function than to explore about _ArraySearch in the help file.. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 14, 2015 Moderators Share Posted February 14, 2015 gil900, I also knew that it will be easier for me to write my own function than to explore about _ArraySearch in the help fileReally? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2015 Share Posted February 14, 2015 (edited) I think so ..This need(Search in 2D array only) is simple enough to write it. It will take less / about the same / little more time to achieve this by cooding it Edited February 14, 2015 by Guest Link to comment Share on other sites More sharing options...
Chimaera Posted February 14, 2015 Author Share Posted February 14, 2015 For those of us not so gifted If i add your update do i need to change the search bit that melba added? If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2015 Share Posted February 14, 2015 (edited) For those of us not so gifted If i add your update do i need to change the search bit that melba added? no There is no need be gifted to write such a simple function (Array2DSearch)Anyone can do it if try hard enough. As to how long it takes, it's up to the experienceIf you're used to work with loops inside loops inside loops(..) then something like this does not take long time... Edited February 14, 2015 by Guest Link to comment Share on other sites More sharing options...
Chimaera Posted February 14, 2015 Author Share Posted February 14, 2015 Ok thx for your update If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
kylomas Posted February 14, 2015 Share Posted February 14, 2015 (edited) If you can use WMI this might work... local $st = timerinit() Global $sRemoveServices = 'AdobeARMservice|AeLookupSvc|AntiVirSchedulerService|AntiVirService|Appinfo|AudioEndpointBuilder|AudioSrv|Avira.OE.ServiceHost|BFE|BITS|Browser|CryptSvc|DcomLaunch|Dhcp|Dnscache|DPS|EventLog|EventSystem|fdPHost|FDResPub|gpsvc|HomeGroupListener|HomeGroupProvider|iphlpsvc|KeyIso|LanmanServer|LanmanWorkstation|lmhosts|MMCSS|MpsSvc|MSDTC|Netman|netprofm|NlaSvc|nsi|p2pimsvc|p2psvc|PlugPlay|PNRPsvc|Power|ProfSvc|ProtectedStorage|RpcEptMapper|RpcSs|SamSs|Schedule|SENS|ShellHWDetection|Spooler|sppsvc|sppuinotify|SSDPSRV|SysMain|Themes|TrkWks|TrustedInstaller|upnphost|UxSms|VSS|WdiServiceHost|WdiSystemHost|WinDefend|WinHttpAutoProxySvc|Winmgmt|WMPNetworkSvc|WPDBusEnum|wscsvc|WSearch|wuauserv|wudfsvc' local $oWMI = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\CIMV2") local $oItems = $oWMI.ExecQuery('select name from win32_service where started=true') Local $str = '' For $oItem In $oItems For $P In $oItem.Properties_() $str &= $P.Value & ',' Next Next local $str2 = stringregexpreplace($str, '^|\,' & $sRemoveServices,'') $str2 = stringregexpreplace($str2,'\,+',',') ConsoleWrite(timerdiff($st)/1000 & ' seconds ' & @CRLF) Output is in comma delimited format. edit: amended SRER, check for comma at end is superfluous edit2: added timer and took out strip of rightmost character (match may occur at the end of string) Edited February 14, 2015 by kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2015 Share Posted February 14, 2015 @kylomas Before I used my function, I previously used another function that I think work with this method And one day I had a problem that the function was take long time to finish. Source: '?do=embed' frameborder='0' data-embedContent>> This is why I use and worte my function that use a completely different method. that function that I use now does not have problems until now and it work stable Link to comment Share on other sites More sharing options...
kylomas Posted February 14, 2015 Share Posted February 14, 2015 (edited) Yes, my run time looks like this... >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:UsersADMIN010Documentshelp - chimeara.au3" /UserParams +>10:18:25 Starting AutoIt3Wrapper v.14.801.2025.0 SciTE v.3.4.4.0 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0409) +> SciTEDir => C:Program Files (x86)AutoIt3SciTE UserDir => C:UsersADMIN010AppDataLocalAutoIt v3SciTEAutoIt3Wrapper SCITE_USERHOME => C:UsersADMIN010AppDataLocalAutoIt v3SciTE >Running AU3Check (3.3.13.19) from:C:Program Files (x86)AutoIt3 input:C:UsersADMIN010Documentshelp - chimeara.au3 +>10:18:25 AU3Check ended.rc:0 >Running:(3.3.12.0):C:Program Files (x86)AutoIt3autoit3.exe "C:UsersADMIN010Documentshelp - chimeara.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop AgereModemAudio,avast! Antivirus,EFS,eventlog,FontCache,hidserv,LightScribeService,Net Driver HPZ12,nvsvc,PcaSvc,Pml Driver HPZ12,PolicyAgent,ReflectService.exe,stisvc,wlidsvc0.143001736815366 +>10:18:25 AutoIt3.exe ended.rc:0 +>10:18:25 AutoIt3Wrapper Finished. >Exit code: 0 Time: 0.7771 I'm not suprised that yours took long. Look at the differences between my code and yours. I guess that I can see a slowdown if WMI is being hammered on the pc or if you are tryting to connect to a remote pc, don't know for sure. Just offering an alternative... Edited February 14, 2015 by kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill 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