Sign in to follow this  
Followers 0
avery

WMI performance help

14 posts in this topic

Problem Summary: Runs really slow. Takes 56 seconds versus 45 minutes scanning files (C:\windows). I scan post more code if needed. Please help dude. :)

Example:

Func _fileOwner($varName)
    Dim $objSD
    Local $oWMIService = ObjGet("winmgmts:")
    Local $oFolderSecuritySettings = $oWMIService.Get("Win32_LogicalFileSecuritySetting='" & $varName & "'")
    Local $intRetVal = $oFolderSecuritySettings.GetSecurityDescriptor($objSD)

    If $intRetVal = 0 Then
        Local $objStr = $objSD.Owner.Domain & "\" & $objSD.Owner.Name;
        Return($objStr)
    Else
        Return("Couldn't retrieve security descriptor.")
    EndIf
EndFunc   ;==>_fileOwner

I scan roughly 28,000 files to get Size and Age and if it's really old I get the owner so I can send him an annoying email (layoffs).

If I don't call this func I can get Size and Age in 56~ seconds. Anyone know why this function will add like 45 minutes out of 56 seconds when it's only called about 300 times out of 28,000 total files

It doesn't return the error code once, it's all successful but for some reason the wmi stuff lags really bad. I tried to add a short sleep in there to get some consistent speed since it just stops for so long at once with no luck.


www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org

Share this post


Link to post
Share on other sites



Pass in $oWMIService to the function so WMI only has to be initialized once and then reused. You could make it a ByRef parameter and only initialize if required:

Global $oWMI
Global $sPath = "C:\Boot.ini"

$sRET = _fileOwner($sPath, $oWMI)

Func _fileOwner($varName, ByRef $oWMIService)
    Dim $objSD
    If Not IsObj($oWMIService) Then $oWMIService = ObjGet("winmgmts:")
    Local $oFolderSecuritySettings = $oWMIService.Get("Win32_LogicalFileSecuritySetting='" & $varName & "'")
    Local $intRetVal = $oFolderSecuritySettings.GetSecurityDescriptor($objSD)

    If $intRetVal = 0 Then
        Local $objStr = $objSD.Owner.Domain & "\" & $objSD.Owner.Name;
        Return($objStr)
    Else
        Return("Couldn't retrieve security descriptor.")
    EndIf
EndFunc   ;==>_fileOwner

:)


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

Share this post


Link to post
Share on other sites

Just curious - how much time does it take now?

Share this post


Link to post
Share on other sites

Just curious - how much time does it take now?

Perhaps you missed this:

If I don't call this func I can get Size and Age in 56~ seconds. Anyone know why this function will add like 45 minutes out of 56 seconds when it's only called about 300 times out of 28,000 total files

:)


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

Share this post


Link to post
Share on other sites

I meant after the modifications you advised.

Share this post


Link to post
Share on other sites

Just curious - how much time does it take now?

I just had a chance to test out the code PsaltyDS graciously posted for me.

It works amazingly fast compared to what it ran before the change.

However I've uncovered another oddity in my program that I'm working: Func Fun() LOL~!

C:\abox\au3\aFc\aFc.au3 (108) : ==> The requested action with this object has failed.:
Local $oFolderSecuritySettings = $oWMIService.Get("Win32_LogicalFileSecuritySetting='" & $varName & "'")
Local $oFolderSecuritySettings = $oWMIService.Get("Win32_LogicalFileSecuritySetting='" & $varName & "'")^ ERROR

I printed the variable I passed to this function when I get this error and I think it is from Guardian Edge Encryption software (volume file).

[20091207_101338] DEBUG: $cf[$i]=C:\EP1.vol

It's a hidden file in C:\ root that doesn't seem to have the normal properties, no permission tab or security/adv tab.

The whole program of mine dies when it gets to this file. I really need my fileScan program to not exit even if it hits an error like an un-readable file.

Anyone know if there is a method to test if a file is accessible with out modifying it? Trying to get past this one, ahh Mondays!

If anyone can help, please!

Thanks,

Avery Howell


www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I ran this from SciTE:

Global $hSearch, $sDir = @SystemDir, $sPath, $iCnt = 0, $oWMI, $iTimer, $iTotalTime = 0, $sOwner

$hSearch = FileFindFirstFile($sDir & "\*.dll")
While 1
    $sPath = $sDir & "\" & FileFindNextFile($hSearch)
    If @error Then ExitLoop
    $iCnt += 1
    $iTimer = TimerInit()
    $sOwner = _fileOwner($sPath, $oWMI)
    $iTimer = TimerDiff($iTimer)
    $iTotalTime += $iTimer
    ConsoleWrite($sPath & " = " & $sOwner & "; Time = " & Round($iTimer, 2) & "msec" & @LF)
WEnd
ConsoleWrite("Count = " & $iCnt & "; Total time = " & Round($iTotalTime/1000, 3) & "sec" & @LF)
ConsoleWrite("Average time for _fileOwner() = " & Round($iTotalTime/$iCnt, 2) & "msec" & @LF)

Func _fileOwner($varName, ByRef $oWMIService)
    Dim $objSD
    If Not IsObj($oWMIService) Then $oWMIService = ObjGet("winmgmts:")
    Local $oFolderSecuritySettings = $oWMIService.Get("Win32_LogicalFileSecuritySetting='" & $varName & "'")
    Local $intRetVal = $oFolderSecuritySettings.GetSecurityDescriptor($objSD)

    If $intRetVal = 0 Then
        Local $objStr = $objSD.Owner.Domain & "\" & $objSD.Owner.Name;
        Return $objStr
    Else
        Return "Couldn't retrieve security descriptor."
    EndIf
EndFunc   ;==>_fileOwner

Result:

Count = 1437; Total time = 477.731sec
Average time for _fileOwner() = 332.45msec
+>12:56:02 AutoIT3.exe ended.rc:0

:)

Edit: My change didn't make much difference. I added "$oWMI = 0" after the TimerDiff(), so it would get a new instance of WMI each time, and the time increased less than 5%. Result:

Count = 1437; Total time = 495.99sec
Average time for _fileOwner() = 345.16msec
Edited 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

Share this post


Link to post
Share on other sites

I can post some code where the response is higher, like 10 fold. I am also doing File Size, Date and getting file attributes though.

As I'm doing more testing it looks like if I use the WMI call on files it can't have access to or these special volume files I posted above it hangs the WMI call for awhile or sometimes even causes the whole program to error out and crash.

I am starting to wonder if it's the files I can't access and not the calling of the WMI 77,000 times as fast as it can call it.


www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org

Share this post


Link to post
Share on other sites

PsaltyDS: run your function on the contents on the Windows directory (all files). Any idea why it hangs like that?


www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org

Share this post


Link to post
Share on other sites

PsaltyDS: run your function on the contents on the Windows directory (all files). Any idea why it hangs like that?

It doesn't hang for me (WinXP Pro SP3). Changed $sDir to @WindowsDir, and the find to $sDir & "\*.*":
Count = 693; Total time = 231.014sec
Average time for _fileOwner() = 333.35msec

Maybe you have machine or user specific issues.

:)


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

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

It doesn't hang for me (WinXP Pro SP3). Changed $sDir to @WindowsDir, and the find to $sDir & "\*.*":

Count = 693; Total time = 231.014sec
Average time for _fileOwner() = 333.35msec

Maybe you have machine or user specific issues.

:)

My system is brand spanking new work laptop. Seems to have issues on some files. dual core, 4GB ram DELL LATITUDE E6400.

I ran mine on C:\Windows and it finished.

+>15:37:34 AutoIt3Wrapper Finished
>Exit code: 0    Time: 4430.343

If I remove the fileOwner WMI function it takes about 91 seconds. I really wish I could figure this out.

EDIT: I am running the code you posted above:

It's still running 10 minutes later.

Global $hSearch, $sDir = @WindowsDir, $sPath, $iCnt = 0, $oWMI, $iTimer, $iTotalTime = 0, $sOwner

$hSearch = FileFindFirstFile($sDir & "\*.*")
While 1
    $sPath = $sDir & "\" & FileFindNextFile($hSearch)
    If @error Then ExitLoop
    $iCnt += 1
    $iTimer = TimerInit()
    $sOwner = _fileOwner($sPath, $oWMI)
    $iTimer = TimerDiff($iTimer)
    $iTotalTime += $iTimer
    ConsoleWrite($sPath & " = " & $sOwner & "; Time = " & Round($iTimer, 2) & "msec" & @LF)
WEnd
ConsoleWrite("Count = " & $iCnt & "; Total time = " & Round($iTotalTime/1000, 3) & "sec" & @LF)
ConsoleWrite("Average time for _fileOwner() = " & Round($iTotalTime/$iCnt, 2) & "msec" & @LF)

Func _fileOwner($varName, ByRef $oWMIService)
    Dim $objSD
    If Not IsObj($oWMIService) Then $oWMIService = ObjGet("winmgmts:")
    Local $oFolderSecuritySettings = $oWMIService.Get("Win32_LogicalFileSecuritySetting='" & $varName & "'")
    Local $intRetVal = $oFolderSecuritySettings.GetSecurityDescriptor($objSD)

    If $intRetVal = 0 Then
        Local $objStr = $objSD.Owner.Domain & "\" & $objSD.Owner.Name;
        Return $objStr
    Else
        Return "Couldn't retrieve security descriptor."
    EndIf
EndFunc   ;==>_fileOwner

Seems like all the "BUILTIN\Administrators" are the slow ones.. Weird.

>"C:\abox\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\abox\au3\aFc\test.au3" /autoit3dir "C:\abox\AutoIt3" /UserParams    
+>16:25:59 Starting AutoIt3Wrapper v.2.0.0.1    Environment(Language:0409  Keyboard:00000409  OS:WIN_XP/Service Pack 3  CPU:X64 OS:X86)
>Running AU3Check (1.54.14.0)  from:C:\abox\AutoIt3
+>16:25:59 AU3Check ended.rc:0
>Running:(3.3.0.0):C:\abox\AutoIt3\autoit3.exe "C:\abox\au3\aFc\test.au3"    
C:\WINDOWS\$hf_mig$ = BUILTIN\Administrators; Time = 7932.72msec
C:\WINDOWS\$NtUninstallKB835221WXP$ = BUILTIN\Administrators; Time = 6396.14msec
C:\WINDOWS\$NtUninstallKB915800-v4$ = ACCT03\rharri14; Time = 112.92msec
C:\WINDOWS\$NtUninstallKB923561$ = ACCT03\rharri14; Time = 38.83msec
C:\WINDOWS\$NtUninstallKB926141$ = ACCT03\rharri14; Time = 38.63msec
C:\WINDOWS\$NtUninstallKB940157$ = ACCT03\rharri14; Time = 38.15msec
C:\WINDOWS\$NtUninstallKB942288-v3$ = ACCT05\ATHOWELL; Time = 38.4msec
C:\WINDOWS\$NtUninstallKB943729$ = ACCT03\rharri14; Time = 38.52msec
C:\WINDOWS\$NtUninstallKB952004$ = ACCT03\rharri14; Time = 39.06msec
C:\WINDOWS\$NtUninstallKB952069_WM9$ = ACCT03\rharri14; Time = 38.6msec
C:\WINDOWS\$NtUninstallKB954155_WM9$ = ACCT03\rharri14; Time = 38.08msec
C:\WINDOWS\$NtUninstallKB954211$ = ACCT03\rharri14; Time = 37.96msec
C:\WINDOWS\$NtUninstallKB954459$ = ACCT03\rharri14; Time = 38.65msec
C:\WINDOWS\$NtUninstallKB954600$ = ACCT03\rharri14; Time = 38.02msec
C:\WINDOWS\$NtUninstallKB955069$ = ACCT03\rharri14; Time = 38.41msec
C:\WINDOWS\$NtUninstallKB955839$ = ACCT03\rharri14; Time = 39.53msec
C:\WINDOWS\$NtUninstallKB956391$ = ACCT03\rharri14; Time = 38.6msec
C:\WINDOWS\$NtUninstallKB956572$ = ACCT03\rharri14; Time = 39.08msec
C:\WINDOWS\$NtUninstallKB956744$ = ACCT03\rharri14; Time = 38.4msec
C:\WINDOWS\$NtUninstallKB956802$ = ACCT03\rharri14; Time = 38.33msec
C:\WINDOWS\$NtUninstallKB956803$ = ACCT03\rharri14; Time = 38.7msec
C:\WINDOWS\$NtUninstallKB956841$ = ACCT03\rharri14; Time = 38.53msec
C:\WINDOWS\$NtUninstallKB956844$ = ACCT03\rharri14; Time = 38.07msec
C:\WINDOWS\$NtUninstallKB957095$ = ACCT03\rharri14; Time = 38.67msec
C:\WINDOWS\$NtUninstallKB957097$ = ACCT03\rharri14; Time = 38.05msec
C:\WINDOWS\$NtUninstallKB958644$ = ACCT03\rharri14; Time = 37.78msec
C:\WINDOWS\$NtUninstallKB958687$ = ACCT03\rharri14; Time = 38.48msec
C:\WINDOWS\$NtUninstallKB958869$ = ACCT03\rharri14; Time = 38.5msec
C:\WINDOWS\$NtUninstallKB959426$ = ACCT03\rharri14; Time = 38.48msec
C:\WINDOWS\$NtUninstallKB960225$ = ACCT03\rharri14; Time = 38.1msec
C:\WINDOWS\$NtUninstallKB960803$ = ACCT03\rharri14; Time = 38.28msec
C:\WINDOWS\$NtUninstallKB960859$ = ACCT03\rharri14; Time = 38.34msec
C:\WINDOWS\$NtUninstallKB961118$ = ACCT03\rharri14; Time = 37.9msec
C:\WINDOWS\$NtUninstallKB961371-v2$ = ACCT03\rharri14; Time = 37.74msec
C:\WINDOWS\$NtUninstallKB961501$ = ACCT03\rharri14; Time = 38.78msec
C:\WINDOWS\$NtUninstallKB963093$ = ACCT03\rharri14; Time = 37.99msec
C:\WINDOWS\$NtUninstallKB967715$ = ACCT03\rharri14; Time = 37.79msec
C:\WINDOWS\$NtUninstallKB968389$ = ACCT03\rharri14; Time = 44.86msec
C:\WINDOWS\$NtUninstallKB968537$ = ACCT03\rharri14; Time = 38.61msec
C:\WINDOWS\$NtUninstallKB968816_WM9$ = ACCT03\rharri14; Time = 38.97msec
C:\WINDOWS\$NtUninstallKB969059$ = ACCT03\rharri14; Time = 38.03msec
C:\WINDOWS\$NtUninstallKB969947$ = BUILTIN\Administrators; Time = 6181.61msec
C:\WINDOWS\$NtUninstallKB970238$ = ACCT03\rharri14; Time = 105.85msec
C:\WINDOWS\$NtUninstallKB970653-v3$ = ACCT03\rharri14; Time = 38.57msec
C:\WINDOWS\$NtUninstallKB971486$ = ACCT03\rharri14; Time = 38.96msec
C:\WINDOWS\$NtUninstallKB971557$ = ACCT03\rharri14; Time = 37.26msec
C:\WINDOWS\$NtUninstallKB971633$ = ACCT03\rharri14; Time = 39.21msec
C:\WINDOWS\$NtUninstallKB971657$ = ACCT03\rharri14; Time = 38.24msec
C:\WINDOWS\$NtUninstallKB971961$ = ACCT03\rharri14; Time = 37.75msec
C:\WINDOWS\$NtUninstallKB973346$ = ACCT03\rharri14; Time = 38msec
C:\WINDOWS\$NtUninstallKB973354$ = ACCT03\rharri14; Time = 38.56msec
C:\WINDOWS\$NtUninstallKB973507$ = ACCT03\rharri14; Time = 37.93msec
C:\WINDOWS\$NtUninstallKB973525$ = ACCT03\rharri14; Time = 38.36msec
C:\WINDOWS\$NtUninstallKB973540_WM9$ = ACCT03\rharri14; Time = 38.36msec
C:\WINDOWS\$NtUninstallKB973815$ = ACCT03\rharri14; Time = 37.75msec
C:\WINDOWS\$NtUninstallKB973869$ = ACCT03\rharri14; Time = 38.44msec
C:\WINDOWS\$NtUninstallKB974112$ = ACCT03\rharri14; Time = 38.24msec
C:\WINDOWS\$NtUninstallKB974571$ = ACCT03\rharri14; Time = 38.19msec
C:\WINDOWS\$NtUninstallKB975025$ = ACCT03\rharri14; Time = 38.26msec
C:\WINDOWS\$NtUninstallKB975467$ = ACCT03\rharri14; Time = 38.51msec
C:\WINDOWS\$NtUninstallWdf01005$ = BUILTIN\Administrators; Time = 6289.71msec
C:\WINDOWS\0.log = BUILTIN\Administrators; Time = 6468.44msec
C:\WINDOWS\003395_.tmp = WPBLEX7586\MS2admin; Time = 162.52msec
C:\WINDOWS\697836DE03BB4C4C9B06CAFC93D0A506.TMP = WPBLEX7586\MS2admin; Time = 336.19msec
C:\WINDOWS\addins = BUILTIN\Administrators; Time = 6688.83msec
C:\WINDOWS\AppPatch = BUILTIN\Administrators; Time = 6680.37msec
C:\WINDOWS\assembly = BUILTIN\Administrators; Time = 6708.11msec
C:\WINDOWS\basecsp.log = WPBLEX7586\MS2admin; Time = 118.31msec
C:\WINDOWS\Blue Lace 16.bmp = BUILTIN\Administrators; Time = 6267.71msec
C:\WINDOWS\BOOT.INI-FWbackup.ini = BUILTIN\Administrators; Time = 6567.89msec
C:\WINDOWS\BOOTNEW.INI = BUILTIN\Administrators; Time = 6292.49msec
C:\WINDOWS\bootstat.dat = BUILTIN\Administrators; Time = 6435.74msec
C:\WINDOWS\ccmdelcert.exe = WPBLEX7586\MS2admin; Time = 165.66msec
C:\WINDOWS\certmmc.log = BUILTIN\Administrators; Time = 6385msec
C:\WINDOWS\clock.avi = BUILTIN\Administrators; Time = 6270.87msec
C:\WINDOWS\cluster = BUILTIN\Administrators; Time = 6701.4msec
C:\WINDOWS\cmsetacl.log = BUILTIN\Administrators; Time = 6444.28msec
C:\WINDOWS\Coffee Bean.bmp = BUILTIN\Administrators; Time = 6155.15msec
C:\WINDOWS\COM+.log = BUILTIN\Administrators; Time = 6455.36msec
C:\WINDOWS\comsetup.log = BUILTIN\Administrators; Time = 6662.26msec
C:\WINDOWS\Config = BUILTIN\Administrators; Time = 6748.02msec
C:\WINDOWS\Connection Wizard = BUILTIN\Administrators; Time = 6832.13msec
C:\WINDOWS\control.ini = BUILTIN\Administrators; Time = 6255.48msec
C:\WINDOWS\CSC = BUILTIN\Administrators; Time = 6339.93msec
C:\WINDOWS\Cursors = BUILTIN\Administrators; Time = 6586.3msec
C:\WINDOWS\Debug = BUILTIN\Administrators; Time = 6654.15msec
C:\WINDOWS\DELLXIMG = WPBLEX7586\MS2admin; Time = 332.73msec
C:\WINDOWS\desktop.ini = BUILTIN\Administrators; Time = 6460.1msec
C:\WINDOWS\DLA.EXE = WPBLEX7586\MS2admin; Time = 168.6msec
C:\WINDOWS\Downloaded Installations = WPBLEX7586\MS2admin; Time = 335.44msec
C:\WINDOWS\Downloaded Program Files = BUILTIN\Administrators; Time = 6476.57msec
C:\WINDOWS\DPINST.LOG = WPBLEX7586\MS2admin; Time = 118.31msec
C:\WINDOWS\Driver Cache = BUILTIN\Administrators; Time = 6504.23msec
C:\WINDOWS\DRIVERS = WPBLEX7586\MS2admin; Time = 228.47msec
C:\WINDOWS\DtcInstall.log = BUILTIN\Administrators; Time = 6430.86msec
C:\WINDOWS\ehome = BUILTIN\Administrators; Time = 6528.37msec
C:\WINDOWS\EPOGUID.EXE = NT AUTHORITY\SYSTEM; Time = 83.38msec
C:\WINDOWS\EventSystem.log = BUILTIN\Administrators; Time = 6402.13msec
C:\WINDOWS\eVPN.exe = BUILTIN\Administrators; Time = 6452.77msec
C:\WINDOWS\explorer.exe = BUILTIN\Administrators; Time = 6296.52msec
C:\WINDOWS\explorer.scf = BUILTIN\Administrators; Time = 6466.31msec
C:\WINDOWS\FaxSetup.log = BUILTIN\Administrators; Time = 6256.38msec
C:\WINDOWS\FeatherTexture.bmp = BUILTIN\Administrators; Time = 6448.04msec
C:\WINDOWS\Fonts = BUILTIN\Administrators; Time = 6734.84msec
C:\WINDOWS\Gone Fishing.bmp = BUILTIN\Administrators; Time = 6141.61msec
C:\WINDOWS\Greenstone.bmp = BUILTIN\Administrators; Time = 6572.02msec
C:\WINDOWS\Help = BUILTIN\Administrators; Time = 6564.59msec
C:\WINDOWS\hh.exe = BUILTIN\Administrators; Time = 6471.09msec
C:\WINDOWS\IDNMitigationAPIs.log = WPBLEX7586\MS2admin; Time = 122.06msec
C:\WINDOWS\ie7 = WPBLEX7586\MS2admin; Time = 606.1msec
C:\WINDOWS\ie7.log = WPBLEX7586\MS2admin; Time = 118.79msec
C:\WINDOWS\ie7updates = WPBLEX7586\MS2admin; Time = 41.71msec
C:\WINDOWS\ie7_main.log = WPBLEX7586\MS2admin; Time = 119msec
C:\WINDOWS\iis6.log = BUILTIN\Administrators; Time = 6621.2msec
C:\WINDOWS\ime = BUILTIN\Administrators; Time = 6540.21msec
C:\WINDOWS\imsins.BAK = ACCT05\ATHOWELL; Time = 101.79msec
C:\WINDOWS\imsins.log = BUILTIN\Administrators; Time = 6384.63msec
C:\WINDOWS\inf = BUILTIN\Administrators; Time = 6797.53msec
C:\WINDOWS\Installer = BUILTIN\Administrators; Time = 6498.93msec
C:\WINDOWS\ISMIF32.dll = BUILTIN\Administrators; Time = 6632msec
C:\WINDOWS\IsUninst.exe = WPBLEX7586\MS2admin; Time = 167.25msec
C:\WINDOWS\java = BUILTIN\Administrators; Time = 6702.61msec
C:\WINDOWS\KB835221.log = BUILTIN\Administrators; Time = 6715.31msec
C:\WINDOWS\KB867282.log = WPBLEX7586\MS2admin; Time = 162.55msec
C:\WINDOWS\KB873333.log = BUILTIN\Administrators; Time = 6443.99msec
C:\WINDOWS\KB873339.log = BUILTIN\Administrators; Time = 6338.97msec
C:\WINDOWS\KB883667.log = WPBLEX7586\MS2admin; Time = 167.37msec
C:\WINDOWS\KB883939.log = BUILTIN\Administrators; Time = 6457.15msec
C:\WINDOWS\KB885250.log = BUILTIN\Administrators; Time = 6421.09msec
C:\WINDOWS\KB885835.log = BUILTIN\Administrators; Time = 6349.43msec
C:\WINDOWS\KB885836.log = BUILTIN\Administrators; Time = 6434.73msec
C:\WINDOWS\KB885855.log = BUILTIN\Administrators; Time = 6278.87msec
C:\WINDOWS\KB886185.log = WPBLEX7586\MS2admin; Time = 157.08msec
C:\WINDOWS\KB887472.log = BUILTIN\Administrators; Time = 6426.17msec
C:\WINDOWS\KB887742.log = BUILTIN\Administrators; Time = 6498.22msec
C:\WINDOWS\KB887797.log = BUILTIN\Administrators; Time = 6334.73msec
C:\WINDOWS\KB888113.log = BUILTIN\Administrators; Time = 6441.59msec
C:\WINDOWS\KB888302.log = BUILTIN\Administrators; Time = 6414.29msec
C:\WINDOWS\KB890046.log = BUILTIN\Administrators; Time = 6272.78msec
C:\WINDOWS\KB890047.log = BUILTIN\Administrators; Time = 6551.75msec
C:\WINDOWS\KB890175.log = BUILTIN\Administrators; Time = 6771.44msec
C:\WINDOWS\KB890859.log = BUILTIN\Administrators; Time = 6774.52msec
C:\WINDOWS\KB890923.log = BUILTIN\Administrators; Time = 6461.96msec
C:\WINDOWS\KB891122.log = WPBLEX7586\MS2admin; Time = 160.44msec
C:\WINDOWS\KB891781.log = BUILTIN\Administrators; Time = 6274.97msec
C:\WINDOWS\KB892130.log = WPBLEX7586\MS2admin; Time = 164.2msec
C:\WINDOWS\KB893066.log = BUILTIN\Administrators; Time = 6418msec
C:\WINDOWS\KB893086.log = BUILTIN\Administrators; Time = 6456.57msec
C:\WINDOWS\KB893357.log = WPBLEX7586\MS2admin; Time = 169.31msec
C:\WINDOWS\KB893756.log = BUILTIN\Administrators; Time = 6265.47msec
C:\WINDOWS\KB893803.log = WPBLEX7586\MS2admin; Time = 169.79msec
C:\WINDOWS\KB893803v2.log = WPBLEX7586\MS2admin; Time = 117.65msec
C:\WINDOWS\KB894391.log = BUILTIN\Administrators; Time = 6455.23msec
C:\WINDOWS\KB896256.log = BUILTIN\Administrators; Time = 6308.73msec
C:\WINDOWS\KB896344.log = WPBLEX7586\MS2admin; Time = 169.37msec
C:\WINDOWS\KB896358.log = BUILTIN\Administrators; Time = 6420.56msec
C:\WINDOWS\KB896422.log = BUILTIN\Administrators; Time = 6476.92msec
C:\WINDOWS\KB896423.log = BUILTIN\Administrators; Time = 6293.77msec
C:\WINDOWS\KB896424.log = BUILTIN\Administrators; Time = 6493.24msec
C:\WINDOWS\KB896428.log = BUILTIN\Administrators; Time = 6262.58msec
C:\WINDOWS\KB896688.log = WPBLEX7586\MS2admin; Time = 160.84msec
C:\WINDOWS\KB898461.log = WPBLEX7586\MS2admin; Time = 118.2msec
C:\WINDOWS\KB899587.log = BUILTIN\Administrators; Time = 6449.83msec
C:\WINDOWS\KB899589.log = BUILTIN\Administrators; Time = 6423.68msec
C:\WINDOWS\KB899591.log = BUILTIN\Administrators; Time = 6267.29msec
C:\WINDOWS\KB900725.log = BUILTIN\Administrators; Time = 6461.99msec
C:\WINDOWS\KB900930.log = BUILTIN\Administrators; Time = 6424.17msec
C:\WINDOWS\KB901017.log = BUILTIN\Administrators; Time = 6367.93msec
C:\WINDOWS\KB901214.log = BUILTIN\Administrators; Time = 6337.89msec
C:\WINDOWS\KB902344.log = WPBLEX7586\MS2admin; Time = 162.92msec
C:\WINDOWS\KB902400.log = BUILTIN\Administrators; Time = 6294.32msec
C:\WINDOWS\KB903235.log = WPBLEX7586\MS2admin; Time = 172.06msec
C:\WINDOWS\KB904706.log = BUILTIN\Administrators; Time = 6400.46msec
C:\WINDOWS\KB904942.log = BUILTIN\Administrators; Time = 6749.22msec
C:\WINDOWS\KB905414.log = BUILTIN\Administrators; Time = 6228.04msec
C:\WINDOWS\KB905749.log = BUILTIN\Administrators; Time = 6676.81msec
C:\WINDOWS\KB905915.log = BUILTIN\Administrators; Time = 6462.68msec
C:\WINDOWS\KB908519.log = BUILTIN\Administrators; Time = 6531.87msec
C:\WINDOWS\KB908531.log = BUILTIN\Administrators; Time = 6952.01msec
C:\WINDOWS\KB908673.log = BUILTIN\Administrators; Time = 7022.71msec
C:\WINDOWS\KB910437.log = WPBLEX7586\MS2admin; Time = 165.94msec
C:\WINDOWS\KB911280.log = BUILTIN\Administrators; Time = 6434.01msec
C:\WINDOWS\KB911562.log = BUILTIN\Administrators; Time = 6432.58msec
C:\WINDOWS\KB911564.log = WPBLEX7586\MS2admin; Time = 168.02msec
C:\WINDOWS\KB911565.log = WPBLEX7586\MS2admin; Time = 120.59msec
C:\WINDOWS\KB911567.log = BUILTIN\Administrators; Time = 6246.46msec
C:\WINDOWS\KB911927.log = BUILTIN\Administrators; Time = 6443.83msec
C:\WINDOWS\KB912475.log = WPBLEX7586\MS2admin; Time = 164.6msec
C:\WINDOWS\KB912812.log = BUILTIN\Administrators; Time = 6299.95msec
C:\WINDOWS\KB912812Uninst.log = WPBLEX7586\MS2admin; Time = 123.65msec
C:\WINDOWS\KB912919.log = BUILTIN\Administrators; Time = 6530.23msec
C:\WINDOWS\KB912945.log = BUILTIN\Administrators; Time = 6392.39msec
C:\WINDOWS\KB913446.log = WPBLEX7586\MS2admin; Time = 161.8msec
C:\WINDOWS\KB913580.log = BUILTIN\Administrators; Time = 6385.56msec
C:\WINDOWS\KB914388.log = BUILTIN\Administrators; Time = 6471.47msec
C:\WINDOWS\KB914389.log = BUILTIN\Administrators; Time = 6553.7msec
C:\WINDOWS\KB914440.log = WPBLEX7586\MS2admin; Time = 164.3msec
C:\WINDOWS\KB914642.log = BUILTIN\Administrators; Time = 6254.53msec
C:\WINDOWS\KB915800-v4.log = ACCT03\rharri14; Time = 179.2msec
C:\WINDOWS\KB915865.log = WPBLEX7586\MS2admin; Time = 147.59msec
C:\WINDOWS\KB916595.log = BUILTIN\Administrators; Time = 6370.33msec
C:\WINDOWS\KB917159.log = BUILTIN\Administrators; Time = 6245.06msec
C:\WINDOWS\KB917344.log = BUILTIN\Administrators; Time = 6434.74msec
C:\WINDOWS\KB917422.log = BUILTIN\Administrators; Time = 6385.74msec
C:\WINDOWS\KB917734.log = WPBLEX7586\MS2admin; Time = 177.72msec
C:\WINDOWS\KB917953.log = BUILTIN\Administrators; Time = 6282.06msec
C:\WINDOWS\KB918118.log = BUILTIN\Administrators; Time = 6437.34msec
C:\WINDOWS\KB918439.log = BUILTIN\Administrators; Time = 6687.03msec
C:\WINDOWS\KB918899.log = BUILTIN\Administrators; Time = 6431.49msec
C:\WINDOWS\KB919007.log = BUILTIN\Administrators; Time = 6379.7msec
C:\WINDOWS\KB920213.log = BUILTIN\Administrators; Time = 6324.34msec
C:\WINDOWS\KB920214.log = BUILTIN\Administrators; Time = 6395.81msec
C:\WINDOWS\KB920342.log = BUILTIN\Administrators; Time = 6379.78msec
C:\WINDOWS\KB920670.log = BUILTIN\Administrators; Time = 6371.42msec
C:\WINDOWS\KB920683.log = BUILTIN\Administrators; Time = 6477.26msec
C:\WINDOWS\KB920685.log = BUILTIN\Administrators; Time = 6285.4msec
C:\WINDOWS\KB921398.log = BUILTIN\Administrators; Time = 6568.9msec
C:\WINDOWS\KB921503.log = BUILTIN\Administrators; Time = 6426msec
C:\WINDOWS\KB921883.log = BUILTIN\Administrators; Time = 6500.37msec
C:\WINDOWS\KB922582.log = WPBLEX7586\MS2admin; Time = 133.88msec
C:\WINDOWS\KB922616.log = BUILTIN\Administrators; Time = 6553.91msec
C:\WINDOWS\KB922760.log = BUILTIN\Administrators; Time = 6363.48msec
C:\WINDOWS\KB922819.log = BUILTIN\Administrators; Time = 6622.13msec
C:\WINDOWS\KB923191.log = BUILTIN\Administrators; Time = 6485.44msec
C:\WINDOWS\KB923414.log = BUILTIN\Administrators; Time = 6429.46msec
C:\WINDOWS\KB923561.log = ACCT03\rharri14; Time = 196.36msec
C:\WINDOWS\KB923689.log = WPBLEX7586\MS2admin; Time = 119.87msec
C:\WINDOWS\KB923694.log = BUILTIN\Administrators; Time = 6567.53msec
C:\WINDOWS\KB923980.log = BUILTIN\Administrators; Time = 6660.75msec
C:\WINDOWS\KB924191.log = BUILTIN\Administrators; Time = 6181.06msec

Another Edit:

I find it very odd that "BUILTIN\Administrators" is a group and not a user [looking for user owner here I thought]. The user account called Administrator has been rename to something else.

Edited by avery

www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org

Share this post


Link to post
Share on other sites

My system is brand spanking new work laptop. Seems to have issues on some files. dual core, 4GB ram DELL LATITUDE E6400.

What version of Windows?

I find it very odd that "BUILTIN\Administrators" is a group and not a user [looking for user owner here I thought].

That's not at all unusual.

The user account called Administrator has been rename to something else.

That's also not unusual, and the renamed Administrator still has the same well-known SID, so it doesn't do much for security either. BTW, it's been renamed on my machine also with no problems.

;)


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

Share this post


Link to post
Share on other sites

What version of Windows?

That's not at all unusual.

That's also not unusual, and the renamed Administrator still has the same well-known SID, so it doesn't do much for security either. BTW, it's been renamed on my machine also with no problems.

;)

Operating System from SciTE initialization: (Windows XP, SP3, most patches are applied)

+>14:04:10 Starting AutoIt3Wrapper v.2.0.0.1    Environment(Language:0409  Keyboard:00000409  OS:WIN_XP/Service Pack 3  CPU:X64 OS:X86)

This really has me stumped.

I REALLY appreciate your help PsaltyDS, not like you are getting paid for this or anything so I really wanted to let you know how much I appreciate your time. I'll be hitting the donate button again, which doesn't put anything in your pocket but again, thanks for trying. At least we gave it a shot.

I am installing virtualBox (SUN hypervisor) and going to test it in there but I need to run this script on machines similar to the one here that is giving me issues. As you could see from my post above it took 6 seconds per file owned by the administrators group, pretty much same time per file that causes issues.


www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org

Share this post


Link to post
Share on other sites

Hello,

I have a similare trouble linked with WMI and XP SP3 plus hotfixes.

My code is working fine for years, but Microsoft has probably change something and for 3 weeks I feel a bad pain because many of my customer gets autoit errors, now, at reboot.

I copy my code, a very classical one.

My feeling is that Microsoft, before its last hotfixes, did boot faster and did start the WMI services properly. Due to SP3 and recent hotfixes, the system does not have same behavior and we get an error that we did not have before. Starnge, but after 2 or 3 miniute, I can start manually the program without any error. It could be because Windows did finsih to start his services.

So all is about SP3/Hotfixes end of 2009/WMI.

As soon I will be able to locate the process that MUST be there to avoid this error, I will add a loop to my code with IF ProcessExists("?????") Then ExitLoop and my program whihc is startd at reboot will not stop on error anymore.

Kind regards

Dominique

----

Func _ComputerGetProcessors(ByRef $aProcessorInfo)

Local $colItems, $objWMIService, $objItem

Dim $aProcessorInfo[1][42], $i = 1

$objWMIService = ObjGet("winmgmts:\\" & $cI_CompName & "\root\CIMV2")

$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Processor", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

If IsObj($colItems) Then

For $objItem In $colItems

ReDim $aProcessorInfo[uBound($aProcessorInfo) + 1][42]

$aProcessorInfo[$i][0] = StringStripWS($objItem.Name, 1)

$aProcessorInfo[$i][37] = $objItem.SystemName

$i += 1

Next

$aProcessorInfo[0][0] = UBound($aProcessorInfo) - 1

If $aProcessorInfo[0][0] < 1 Then

SetError(1, 1, 0)

EndIf

Else

SetError(1, 2, 0)

EndIf

Return $aProcessorInfo[1][0]

EndFunc ;==>_ComputerGetProcessors

Share this post


Link to post
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
Sign in to follow this  
Followers 0