Jump to content

Issue with ArrayDelete


Chimaera
 Share

Go to solution Solved by Melba23,

Recommended Posts

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

#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

post-60350-0-67554100-1423830918_thumb.p

 

>"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 by Chimaera
Link to comment
Share on other sites

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 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

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.

Link to comment
Share on other sites

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 by Chimaera
Link to comment
Share on other sites

  • Moderators

Chimaera,

 

The Latest array to string requires beta to work

If 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 by Melba23
Typo

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 by Chimaera
Link to comment
Share on other sites

  • Moderators

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? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 by Chimaera
Link to comment
Share on other sites

  • Moderators
  • Solution

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
EndFunc
M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 by Guest
Link to comment
Share on other sites

  • Moderators

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? :wacko:

 

$iSubItem: [optional] Sub-index to search on in 2D arrays

You can search 2D arrays perfectly with _ArraySearch, as the second example in the Help file makes plain. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

  • Moderators

gil900,

 

I also knew that it will be easier for me to write my own function than to explore about _ArraySearch in the help file

Really? :wacko:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 by Guest
Link to comment
Share on other sites

For those of us not so gifted  :x

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 experience

If you're used to work with loops inside loops inside loops(..) then something like this does not take long time...

Edited by Guest
Link to comment
Share on other sites

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 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

@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

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,wlidsvc
0.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 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...