Jump to content

Choose/Display Log file in real time


Recommended Posts

Hmmm, thinking about this, wouldn't it even be better not to clear the edit, but use the difference in size ($fs_new - $fs) to performa a FileSetPos() operation instead to move the read pointer to the new content and then do a FileReadLine() loop for new lines only? But I'm not quite sure if FileReadLine() works correctly in conjunction with FileSetPos() :mellow:.

Edit: The FileOpen() handle prevented me to write to the log via notepad... I'm not quite sure if this wouldn't be true for other programs too, thus I think it's better to close the handle once the data has been received. Of course this works only if new data is only appended to the log.

...

Thanks for your effort KaFu but it is not working properly! :P

WindowsUpdate.log

2010-06-30  21:05:17:590    1200    1130    Misc    =========== Logging initialized (build: 7.4.7600.226, tz: +0200) ===========
2010-06-30  21:05:17:590    1200    1130    Misc = Process: C:\Windows\system32\svchost.exe
2010-06-30  21:05:17:590    1200    1130    Misc = Module: c:\windows\system32\wuaueng.dll
2010-06-30  21:05:17:590    1200    1130    Service *************
2010-06-30  21:05:17:590    1200    1130    Service ** START ** Service: Service startup
2010-06-30  21:05:17:590    1200    1130    Service *********
2010-06-30  21:05:17:606    1200    1130    Agent * WU client version 7.4.7600.226
2010-06-30  21:05:17:606    1200    1130    Agent * Base directory: C:\Windows\SoftwareDistribution
2010-06-30  21:05:17:606    1200    1130    Agent * Access type: No proxy
2010-06-30  21:05:17:606    1200    1130    Agent * Network state: Connected
2010-06-30  21:05:32:925    1200    1130    Report  CWERReporter::Init succeeded
2010-06-30  21:05:33:424    1200    1130    Report  *********** Report: Initializing static reporting data ***********
2010-06-30  21:05:33:424    1200    1130    Report * OS Version = 6.0.6002.2.0.65792
2010-06-30  21:05:33:424    1200    1130    Report * OS Product Type = 0x00000004
2010-06-30  21:05:33:456    1200    1130    Report * Computer Brand = Dell Inc.
2010-06-30  21:05:33:456    1200    1130    Report * Computer Model = Latitude D830     
2010-06-30  21:05:33:471    1200    1130    Report * Bios Revision = A15
2010-06-30  21:05:33:471    1200    1130    Report * Bios Name = Phoenix ROM BIOS PLUS Version 1.10 A15
2010-06-30  21:05:33:471    1200    1130    Report * Bios Release Date = 2010-01-04T00:00:00
2010-06-30  21:05:33:471    1200    1130    Report * Locale ID = 1031
2010-06-30  21:05:33:471    1200    1130    AU  ########### AU: Uninitializing Automatic Updates ###########
2010-06-30  21:05:33:471    1200    1130    Report  CWERReporter finishing event handling. (00000000)
2010-06-30  21:05:33:549    1200    1130    Service *********
2010-06-30  21:05:33:549    1200    1130    Service ** END ** Service: Service exit [Exit code = 0x240001]
2010-06-30  21:05:33:549    1200    1130    Service *************
2010-06-30  21:05:34:267    1200    14d4    Misc    =========== Logging initialized (build: 7.4.7600.226, tz: +0200) ===========
2010-06-30  21:05:34:267    1200    14d4    Misc = Process: C:\Windows\system32\svchost.exe
2010-06-30  21:05:34:267    1200    14d4    Misc = Module: c:\windows\system32\wuaueng.dll
2010-06-30  21:05:34:267    1200    14d4    Service *************
2010-06-30  21:05:34:267    1200    14d4    Service ** START ** Service: Service startup
2010-06-30  21:05:34:267    1200    14d4    Service *********
2010-06-30  21:05:34:282    1200    14d4    Agent * WU client version 7.4.7600.226
2010-06-30  21:05:34:282    1200    14d4    Agent * Base directory: C:\Windows\SoftwareDistribution
2010-06-30  21:05:34:282    1200    14d4    Agent * Access type: No proxy
2010-06-30  21:05:34:282    1200    14d4    Agent * Network state: Connected
2010-06-30  21:06:13:251    1200    14b8    Report  CWERReporter::Init succeeded
2010-06-30  21:06:13:251    1200    14b8    Agent   *********** Agent: Initializing Windows Update Agent ***********
2010-06-30  21:06:13:251    1200    14b8    Agent   *********** Agent: Initializing global settings cache ***********
2010-06-30  21:06:13:251    1200    14b8    Agent * WSUS server: <NULL>
2010-06-30  21:06:13:251    1200    14b8    Agent * WSUS status server: <NULL>
2010-06-30  21:06:13:251    1200    14b8    Agent * Target group: (Unassigned Computers)
2010-06-30  21:06:13:251    1200    14b8    Agent * Windows Update access disabled: No
2010-06-30  21:06:13:251    1200    14b8    DnldMgr Download manager restoring 0 downloads
2010-06-30  21:06:13:251    1200    14b8    AU  ########### AU: Initializing Automatic Updates ###########
2010-06-30  21:06:13:251    1200    14b8    AU # Approval type: Pre-install notify (User preference)
2010-06-30  21:06:13:251    1200    14b8    AU # Auto-install minor updates: No (User preference)
2010-06-30  21:06:13:251    1200    14b8    AU # Will interact with non-admins (Non-admins are elevated (User preference))
2010-06-30  21:06:13:251    1200    14b8    AU # Will display featured software notifications (User preference)
2010-06-30  21:06:13:360    1200    14b8    AU  Initializing featured updates
2010-06-30  21:06:13:360    1200    14b8    AU  Found 0 cached featured updates
2010-06-30  21:06:13:360    1200    14b8    AU  AU finished delayed initialization
2010-06-30  21:06:13:360    1200    14b8    AU  Triggering AU detection through DetectNow API
2010-06-30  21:06:13:360    1200    14b8    AU  Triggering Online detection (non-interactive)
2010-06-30  21:06:13:501    1200    14d4    Report  *********** Report: Initializing static reporting data ***********
2010-06-30  21:06:13:501    1200    14d4    Report * OS Version = 6.0.6002.2.0.65792
2010-06-30  21:06:13:501    1200    14d4    Report * OS Product Type = 0x00000004
2010-06-30  21:06:13:532    1200    14d4    Report * Computer Brand = Dell Inc.
2010-06-30  21:06:13:532    1200    14d4    Report * Computer Model = Latitude D830     
2010-06-30  21:06:13:532    1200    14d4    Report * Bios Revision = A15
2010-06-30  21:06:13:532    1200    14d4    Report * Bios Name = Phoenix ROM BIOS PLUS Version 1.10 A15
2010-06-30  21:06:13:532    1200    14d4    Report * Bios Release Date = 2010-01-04T00:00:00
2010-06-30  21:06:13:532    1200    14d4    Report * Locale ID = 1031
2010-06-30  21:06:13:548    1200    14d4    AU  #############
2010-06-30  21:06:13:548    1200    14d4    AU  ## START ## AU: Search for updates
2010-06-30  21:06:13:548    1200    14d4    AU  #########
2010-06-30  21:06:13:548    1200    14d4    AU  <<## SUBMITTED ## AU: Search for updates [CallId = {B5B2978B-B26A-49AF-881B-3FB42774F5B4}]
2010-06-30  21:06:14:874    1200    274 Agent   *************
2010-06-30  21:06:14:874    1200    274 Agent   ** START ** Agent: Finding updates [CallerId = AutomaticUpdates]
2010-06-30  21:06:14:874    1200    274 Agent   *********
2010-06-30  21:06:14:874    1200    274 Agent * Online = Yes; Ignore download priority = No
2010-06-30  21:06:14:874    1200    274 Agent * Criteria = "IsInstalled=0 and DeploymentAction='Installation' or IsPresent=1 and DeploymentAction='Uninstallation' or IsInstalled=1 and DeploymentAction='Installation' and RebootRequired=1 or IsInstalled=0 and DeploymentAction='Uninstallation' and RebootRequired=1"
2010-06-30  21:06:14:874    1200    274 Agent * ServiceID = {7971F918-A847-4430-9279-4A52D1EFE18D} Third party service
2010-06-30  21:06:14:874    1200    274 Agent * Search Scope = {Machine}
2010-06-30  21:06:14:905    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\WuRedir\9482F4B4-E343-43B6-B170-9A65BC822C77\muv4wuredir.cab:
2010-06-30  21:06:14:920    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:179    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\WuRedir\9482F4B4-E343-43B6-B170-9A65BC822C77\muv4wuredir.cab:
2010-06-30  21:06:29:179    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:210    1200    274 Agent   Checking for updated auth cab for service 7971f918-a847-4430-9279-4a52d1efe18d at [url="http://download.windowsupdate.com/v9/microsoftupdate/redir/muauth.cab"]http://download.windowsupdate.com/v9/microsoftupdate/redir/muauth.cab[/url]
2010-06-30  21:06:29:210    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\AuthCabs\authcab.cab:
2010-06-30  21:06:29:210    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:272    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\AuthCabs\authcab.cab:
2010-06-30  21:06:29:288    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:288    1200    274 Setup   Checking for agent SelfUpdate
2010-06-30  21:06:29:288    1200    274 Setup   Client version: Core: 7.4.7600.226 Aux: 7.4.7600.226
2010-06-30  21:06:29:304    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\WuRedir\9482F4B4-E343-43B6-B170-9A65BC822C77\muv4wuredir.cab:
2010-06-30  21:06:29:319    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:382    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\WuRedir\9482F4B4-E343-43B6-B170-9A65BC822C77\muv4wuredir.cab:
2010-06-30  21:06:29:397    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:397    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\SelfUpdate\wuident.cab:
2010-06-30  21:06:29:413    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:912    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\SelfUpdate\wuident.cab:
2010-06-30  21:06:29:912    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:912    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\SelfUpdate\wsus3setup.cab:
2010-06-30  21:06:29:912    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:990    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\SelfUpdate\wsus3setup.cab:
2010-06-30  21:06:29:990    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:30:021    1200    274 Setup   Determining whether a new setup handler needs to be downloaded
2010-06-30  21:06:30:021    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\SelfUpdate\Handler\WuSetupV.exe:
2010-06-30  21:06:30:037    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:30:037    1200    274 Setup   SelfUpdate handler update NOT required: Current version: 7.4.7600.226, required version: 7.4.7600.226
2010-06-30  21:06:30:037    1200    274 Setup   Evaluating applicability of setup package "WUClient-SelfUpdate-ActiveX~31bf3856ad364e35~x86~~7.4.7600.226"
2010-06-30  21:06:30:037    1200    274 Setup   Setup package "WUClient-SelfUpdate-ActiveX~31bf3856ad364e35~x86~~7.4.7600.226" is already installed.
2010-06-30  21:06:30:037    1200    274 Setup   Evaluating applicability of setup package "WUClient-SelfUpdate-Aux-TopLevel~31bf3856ad364e35~x86~~7.4.7600.226"
2010-06-30  21:06:30:068    1200    274 Setup   Setup package "WUClient-SelfUpdate-Aux-TopLevel~31bf3856ad364e35~x86~~7.4.7600.226" is already installed.
2010-06-30  21:06:30:068    1200    274 Setup   Evaluating applicability of setup package "WUClient-SelfUpdate-Core-TopLevel~31bf3856ad364e35~x86~~7.4.7600.226"
2010-06-30  21:06:30:099    1200    274 Setup   Setup package "WUClient-SelfUpdate-Core-TopLevel~31bf3856ad364e35~x86~~7.4.7600.226" is already installed.
2010-06-30  21:06:30:099    1200    274 Setup   SelfUpdate check completed. SelfUpdate is NOT required.
2010-06-30  21:06:42:345    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\WuRedir\7971F918-A847-4430-9279-4A52D1EFE18D\muv4muredir.cab:
2010-06-30  21:06:42:361    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:42:486    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\WuRedir\7971F918-A847-4430-9279-4A52D1EFE18D\muv4muredir.cab:
2010-06-30  21:06:42:501    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:42:501    1200    274 PT  +++++++++++ PT: Synchronizing server updates +++++++++++
2010-06-30  21:06:42:501    1200    274 PT + ServiceId = {7971F918-A847-4430-9279-4A52D1EFE18D}, Server URL = [url="https://www.update.microsoft.com/v6/ClientWebService/client.asmx"]https://www.update.microsoft.com/v6/ClientWebService/client.asmx[/url]
2010-06-30  21:06:47:134    1200    274 PT  WARNING: SyncUpdates failure, error = 0x8024400D, soap client error = 7, soap error code = 300, HTTP status code = 200
2010-06-30  21:06:47:134    1200    274 PT  WARNING: SOAP Fault: 0x00012c
2010-06-30  21:06:47:134    1200    274 PT  WARNING:    faultstring:Fault occurred
2010-06-30  21:06:47:134    1200    274 PT  WARNING:    ErrorCode:ConfigChanged(2)
2010-06-30  21:06:47:134    1200    274 PT  WARNING:    Message:(null)
2010-06-30  21:06:47:134    1200    274 PT  WARNING:    Method:"http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService/SyncUpdates"
2010-06-30  21:06:47:134    1200    274 PT  WARNING:    ID:4f7858ee-9d6a-4d9f-a348-4303b7132d8b
2010-06-30  21:07:20:097    1200    274 Agent   WARNING: Failed to evaluate Installable rule, updateId = {2C288ACA-369E-434F-B90E-3A7A43B10E0D}.103, hr = 8004100E
2010-06-30  21:07:25:386    1200    14d4    AU  ########### AU: Uninitializing Automatic Updates ###########
2010-06-30  21:07:26:181    1200    274 Agent * WARNING: Exit code = 0x8024000B
2010-06-30  21:07:26:181    1200    274 Agent   *********
2010-06-30  21:07:26:181    1200    274 Agent   ** END ** Agent: Finding updates [CallerId = AutomaticUpdates]
2010-06-30  21:07:26:181    1200    274 Agent   *************
2010-06-30  21:07:26:181    1200    274 Agent   WARNING: WU client failed Searching for update with error 0x8024000b
2010-06-30  21:07:26:197    1200    14d4    Agent   Sending shutdown notification to client
2010-06-30  21:07:26:290    1200    14d4    Report  CWERReporter finishing event handling. (00000000)
2010-06-30  21:07:26:290    1200    14d4    Report  CWERReporter finishing event handling. (00000000)
2010-06-30  21:07:26:602    1200    14d4    Service *********
2010-06-30  21:07:26:602    1200    14d4    Service ** END ** Service: Service exit [Exit code = 0x240001]
2010-06-30  21:07:26:602    1200    14d4    Service *************

Text created with script:

2010-06-30  21:05:32:925    1200    1130    Report  CWERReporter::Init succeeded
2010-06-30  21:05:33:424    1200    1130    Report  *********** Report: Initializing static reporting data ***********
2010-06-30  21:05:33:424    1200    1130    Report * OS Version = 6.0.6002.2.0.65792
2010-06-30  21:05:33:424    1200    1130    Report * OS Product Type = 0x00000004
2010-06-30  21:05:33:456    1200    1130    Report * Computer Brand = Dell Inc.
2010-06-30  21:05:33:456    1200    1130    Report * Computer Model = Latitude D830     
2010-06-30  21:05:33:471    1200    1130    Report * Bios Revision = A15
2010-06-30  21:05:33:471    1200    1130    Report * Bios Name = Phoenix ROM BIOS PLUS Version 1.10 A15
2010-06-30  21:05:33:471    1200    1130    Report * Bios Release Date = 2010-01-04T00:00:00
2010-06-30  21:05:33:471    1200    1130    Report * Locale ID = 1031
2010-06-30  21:05:33:471    1200    1130    AU  ########### AU: Uninitializing Automatic Updates ###########
2010-06-30  21:05:33:471    1200    1130    Report  CWERReporter finishing event handling. (00000000)
2010-06-30  21:05:33:549    1200    1130    Service *********
2010-06-30  21:05:33:549    1200    1130    Service ** END ** Service: Service exit [Exit code = 0x240001]
2010-06-30  21:05:33:549    1200    1130    Service *************
2010-06-30  21:05:34:267    1200    14d4    Misc    =========== Logging initialized (build: 7.4.7600.226, tz: +0200) ===========
2010-06-30  21:05:34:267    1200    14d4    Misc = Process: C:\Windows\system32\svchost.exe
2010-06-30  21:05:34:267    1200    14d4    Misc = Module: c:\windows\system32\wuaueng.dll
2010-06-30  21:05:34:267    1200    14d4    Service *************
2010-06-30  21:05:34:267    1200    14d4    Service ** START ** Service: Service startup
2010-06-30  21:05:34:267    1200    14d4    Service *********
2010-06-30  21:05:34:282    1200    14d4    Agent * WU client version 7.4.7600.226
2010-06-30  21:05:34:282    1200    14d4    Agent * Base directory: C:\Windows\SoftwareDistribution
2010-06-30  21:05:34:282    1200    14d4    Agent * Access type: No proxy
2010-06-30  21:05:34:282    1200    14d4    Agent * Network state: Connected
2010-06-30  21:05:34:267    1200    14d4    Misc    =========== Logging initialized (build: 7.4.7600.226, tz: +0200) ===========
2010-06-30  21:05:34:267    1200    14d4    Misc = Process: C:\Windows\system32\svchost.exe
2010-06-30  21:05:34:267    1200    14d4    Misc = Module: c:\windows\system32\wuaueng.dll
2010-06-30  21:05:34:267    1200    14d4    Service *************
2010-06-30  21:05:34:267    1200    14d4    Service ** START ** Service: Service startup
2010-06-30  21:05:34:267    1200    14d4    Service *********
2010-06-30  21:05:34:282    1200    14d4    Agent * WU client version 7.4.7600.226
2010-06-30  21:05:34:282    1200    14d4    Agent * Base directory: C:\Windows\SoftwareDistribution
2010-06-30  21:05:34:282    1200    14d4    Agent * Access type: No proxy
2010-06-30  21:05:34:282    1200    14d4    Agent * Network state: Connected
 (User preference))
2010-06-30  21:06:13:251    1200    14b8    AU # Will display featured software notifications (User preference)
2010-06-30  21:06:13:360    1200    14b8    AU  Initializing featured updates
2010-06-30  21:06:13:360    1200    14b8    AU  Found 0 cached featured updates
2010-06-30  21:06:13:360    1200    14b8    AU  AU finished delayed initialization
2010-06-30  21:06:13:360    1200    14b8    AU  Triggering AU detection through DetectNow API
2010-06-30  21:06:13:360    1200    14b8    AU  Triggering Online detection (non-interactive)
2010-06-30  21:06:13:501    1200    14d4    Report  *********** Report: Initializing static reporting data ***********
2010-06-30  21:06:13:501    1200    14d4    Report * OS Version = 6.0.6002.2.0.65792
2010-06-30  21:06:13:501    1200    14d4    Report * OS Product Type = 0x00000004
2010-06-30  21:06:13:532    1200    14d4    Report * Computer Brand = Dell Inc.
2010-06-30  21:06:13:532    1200    14d4    Report * Computer Model = Latitude D830     
2010-06-30  21:06:13:532    1200    14d4    Report * Bios Revision = A15
2010-06-30  21:06:13:532    1200    14d4    Report * Bios Name = Phoenix ROM BIOS PLUS Version 1.10 A15
2010-06-30  21:06:13:532    1200    14d4    Report * Bios Release Date = 2010-01-04T00:00:00
2010-06-30  21:06:13:532    1200    14d4    Report * Locale ID = 1031
2010-06-30  21:06:13:548    1200    14d4    AU  #############
2010-06-30  21:06:13:548    1200    14d4    AU  ## START ## AU: Search for updates
2010-06-30  21:06:13:548    1200    14d4    AU  #########
2010-06-30  21:06:13:548    1200    14d4    AU  <<## SUBMITTED ## AU: Search for updates [CallId = {B5B2978B-B26A-49AF-881B-3FB42774F5B4}]
978B-B26A-49AF-881B-3FB42774F5B4}]
2010-06-30  21:06:14:874    1200    274 Agent   *************
2010-06-30  21:06:14:874    1200    274 Agent   ** START ** Agent: Finding updates [CallerId = AutomaticUpdates]
2010-06-30  21:06:14:874    1200    274 Agent   *********
2010-06-30  21:06:14:874    1200    274 Agent * Online = Yes; Ignore download priority = No
2010-06-30  21:06:14:874    1200    274 Agent * Criteria = "IsInstalled=0 and DeploymentAction='Installation' or IsPresent=1 and DeploymentAction='Uninstallation' or IsInstalled=1 and DeploymentAction='Installation' and RebootRequired=1 or IsInstalled=0 and DeploymentAction='Uninstallation' and RebootRequired=1"
2010-06-30  21:06:14:874    1200    274 Agent * ServiceID = {7971F918-A847-4430-9279-4A52D1EFE18D} Third party service
2010-06-30  21:06:14:874    1200    274 Agent * Search Scope = {Machine}
2010-06-30  21:06:14:905    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\WuRedir\9482F4B4-E343-43B6-B170-9A65BC822C77\muv4wuredir.cab:
2010-06-30  21:06:14:920    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:14:874    1200    274 Agent   *************
2010-06-30  21:06:14:874    1200    274 Agent   ** START ** Agent: Finding updates [CallerId = AutomaticUpdates]
2010-06-30  21:06:14:874    1200    274 Agent   *********
2010-06-30  21:06:14:874    1200    274 Agent * Online = Yes; Ignore download priority = No
2010-06-30  21:06:14:874    1200    274 Agent * Criteria = "IsInstalled=0 and DeploymentAction='Installation' or IsPresent=1 and DeploymentAction='Uninstallation' or IsInstalled=1 and DeploymentAction='Installation' and RebootRequired=1 or IsInstalled=0 and DeploymentAction='Uninstallation' and RebootRequired=1"
2010-06-30  21:06:14:874    1200    274 Agent * ServiceID = {7971F918-A847-4430-9279-4A52D1EFE18D} Third party service
2010-06-30  21:06:14:874    1200    274 Agent * Search Scope = {Machine}
2010-06-30  21:06:14:905    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\WuRedir\9482F4B4-E343-43B6-B170-9A65BC822C77\muv4wuredir.cab:
2010-06-30  21:06:14:920    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:179    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\WuRedir\9482F4B4-E343-43B6-B170-9A65BC822C77\muv4wuredir.cab:
2010-06-30  21:06:29:179    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:210    1200    274 Agent   Checking for updated auth cab for service 7971f918-a847-4430-9279-4a52d1efe18d at [url="http://download.windowsupdate.com/v9/microsoftupdate/redir/muauth.cab"]http://download.windowsupdate.com/v9/microsoftupdate/redir/muauth.cab[/url]
2010-06-30  21:06:29:210    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\AuthCabs\authcab.cab:
2010-06-30  21:06:29:210    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:272    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\AuthCabs\authcab.cab:
2010-06-30  21:06:29:288    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:288    1200    274 Setup   Checking for agent SelfUpdate
2010-06-30  21:06:29:288    1200    274 Setup   Client version: Core: 7.4.7600.226 Aux: 7.4.7600.226
2010-06-30  21:06:29:304    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\WuRedir\9482F4B4-E343-43B6-B170-9A65BC822C77\muv4wuredir.cab:
2010-06-30  21:06:29:319    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:382    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\WuRedir\9482F4B4-E343-43B6-B170-9A65BC822C77\muv4wuredir.cab:
2010-06-30  21:06:29:397    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:397    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\SelfUpdate\wuident.cab:
2010-06-30  21:06:29:413    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:912    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\SelfUpdate\wuident.cab:
2010-06-30  21:06:29:912    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:912    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\SelfUpdate\wsus3setup.cab:
2010-06-30  21:06:29:912    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:29:990    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\SelfUpdate\wsus3setup.cab:
2010-06-30  21:06:29:990    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:30:021    1200    274 Setup   Determining whether a new setup handler needs to be downloaded
2010-06-30  21:06:30:021    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\SelfUpdate\Handler\WuSetupV.exe:
2010-06-30  21:06:30:037    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:30:037    1200    274 Setup   SelfUpdate handler update NOT required: Current version: 7.4.7600.226, required version: 7.4.7600.226
2010-06-30  21:06:30:037    1200    274 Setup   Evaluating applicability of setup package "WUClient-SelfUpdate-ActiveX~31bf3856ad364e35~x86~~7.4.7600.226"
2010-06-30  21:06:30:037    1200    274 Setup   Setup package "WUClient-SelfUpdate-ActiveX~31bf3856ad364e35~x86~~7.4.7600.226" is already installed.
2010-06-30  21:06:30:037    1200    274 Setup   Evaluating applicability of setup package "WUClient-SelfUpdate-Aux-TopLevel~31bf3856ad364e35~x86~~7.4.7600.226"
2010-06-30  21:06:30:068    1200    274 Setup   Setup package "WUClient-SelfUpdate-Aux-TopLevel~31bf3856ad364e35~x86~~7.4.7600.226" is already installed.
2010-06-30  21:06:30:068    1200    274 Setup   Evaluating applicability of setup package "WUClient-SelfUpdate-Core-TopLevel~31bf3856ad364e35~x86~~7.4.7600.226"
2010-06-30  21:06:30:099    1200    274 Setup   Setup package "WUClient-SelfUpdate-Core-TopLevel~31bf3856ad364e35~x86~~7.4.7600.226" is already installed.
2010-06-30  21:06:30:099    1200    274 Setup   SelfUpdate check completed. SelfUpdate is NOT required.
2010-06-30  21:06:42:345    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\WuRedir\7971F918-A847-4430-9279-4A52D1EFE18D\muv4muredir.cab:
2010-06-30  21:06:42:361    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:42:486    1200    274 Misc    Validating signature for C:\Windows\SoftwareDistribution\WuRedir\7971F918-A847-4430-9279-4A52D1EFE18D\muv4muredir.cab:
2010-06-30  21:06:42:501    1200    274 Misc Microsoft signed: Yes
2010-06-30  21:06:42:501    1200    274 PT  +++++++++++ PT: Synchronizing server updates +++++++++++
2010-06-30  21:06:42:501    1200    274 PT + ServiceId = {7971F918-A847-4430-9279-4A52D1EFE18D}, Server URL = [url="https://www.update.microsoft.com/v6/ClientWebService/client.asmx"]https://www.update.microsoft.com/v6/ClientWebService/client.asmx[/url]
2010-06-30  21:06:47:134    1200    274 PT  WARNING: SyncUpdates failure, error = 0x8024400D, soap client error = 7, soap error code = 300, HTTP status code = 200
2010-06-30  21:06:47:134    1200    274 PT  WARNING: SOAP Fault: 0x00012c
2010-06-30  21:06:47:134    1200    274 PT  WARNING:    faultstring:Fault occurred
2010-06-30  21:06:47:134    1200    274 PT  WARNING:    ErrorCode:ConfigChanged(2)
2010-06-30  21:06:47:134    1200    274 PT  WARNING:    Message:(null)
2010-06-30  21:06:47:134    1200    274 PT  WARNING:    Method:"http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService/SyncUpdates"
2010-06-30  21:06:47:134    1200    274 PT  WARNING:    ID:4f7858ee-9d6a-4d9f-a348-4303b7132d8b
2010-06-30  21:07:20:097    1200    274 Agent   WARNING: Failed to evaluate Installable rule, updateId = {2C288ACA-369E-434F-B90E-3A7A43B10E0D}.103, hr = 8004100E
2010-06-30  21:07:25:386    1200    14d4    AU  ########### AU: Uninitializing Automatic Updates ###########
2010-06-30  21:07:26:181    1200    274 Agent * WARNING: Exit code = 0x8024000B
2010-06-30  21:07:26:181    1200    274 Agent   *********
2010-06-30  21:07:26:181    1200    274 Agent   ** END ** Agent: Finding updates [CallerId = AutomaticUpdates]
2010-06-30  21:07:26:181    1200    274 Agent   *************
2010-06-30  21:07:26:181    1200    274 Agent   WARNING: WU client failed Searching for update with error 0x8024000b
2010-06-30  21:07:26:197    1200    14d4    Agent   Sending shutdown notification to client
2010-06-30  21:07:26:290    1200    14d4    Report  CWERReporter finishing event handling. (00000000)
2010-06-30  21:07:26:290    1200    14d4    Report  CWERReporter finishing event handling. (00000000)
2010-06-30  21:07:26:602    1200    14d4    Service *********
2010-06-30  21:07:26:602    1200    14d4    Service ** END ** Service: Service exit [Exit code = 0x240001]
2010-06-30  21:07:26:602    1200    14d4    Service *************

I'm testing it also since 1h but it is not working properly :party:

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

I'm testing it also since 1h but it is not working properly :P

:mellow:, maybe it's related to the file being locked from time to time? Although I repositioned the FileGetSize() call, give this a try.

;Coded by UEZ Build 2010-06-30, tweaked by KaFu ;-)
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#include <GuiEdit.au3>
Opt("GUIOnEventMode", 1)

Global $iMemo, $new_line
$width = 1024
$height = 600
$hGUI = GUICreate("Realtime Log Reader by UEZ & KaFu 2010", $width, $height, -1, -1, Default, $WS_EX_TOPMOST)
$iMemo = GUICtrlCreateEdit("", 0, 0, $width, $height, $ES_AUTOVSCROLL + $WS_VSCROLL + $WS_HSCROLL + $ES_READONLY)
GUICtrlSetLimit(-1, 0x7FFFFFFF)
GUICtrlSetFont($iMemo, 8.5, 400, 0, "Lucida Console")
GUISetState()
If $CmdLine[0] > 0 And FileExists($CmdLine[1]) Then
    $file = $CmdLine[1]
Else
    $file = @WindowsDir & "\WindowsUpdate.log"
    ;$file = @ScriptDir & "\WindowsUpdate.log"
EndIf

$hFile = _FileOpen_Wrapper($file)
$txt = FileRead($hFile)
$fs = FileGetSize($file)
FileClose($hFile)
ConsoleWrite($txt)
_GUICtrlEdit_SetText($iMemo, $txt)
_GUICtrlEdit_LineScroll($iMemo, 0, 0xfffffff)

GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")

While Sleep(1000)
    $fs_new = FileGetSize($file)
    If $fs < $fs_new Then
        $hFile = _FileOpen_Wrapper($file)
        If $hFile <> -1 Then
            $fs_new = FileGetSize($file)
            FileSetPos($hFile, -($fs_new - $fs), 2)
            $new_line = FileRead($hFile)
            FileClose($hFile)
            _GUICtrlEdit_AppendText($iMemo, $new_line)
            $fs = $fs_new
        EndIf
        $new_line = ""
    EndIf
WEnd

Func _Exit()
    GUIDelete($hGUI)
    Exit
EndFunc   ;==>_Exit

Func _FileOpen_Wrapper($file)
    $hFile = -1
    $timer = TimerInit()
    While $hFile = -1
        $hFile = FileOpen($file,128)
        If $hFile <> -1 Then ExitLoop
        Sleep(100)
        If TimerDiff($timer) > 5000 Then
            MsgBox(48, "Access Error", "File" & @CRLF & $file & @CRLF & "could not be opend in 5 seconds...")
            Exit
        EndIf
    WEnd
    Return $hFile
EndFunc   ;==>_FileOpen_Wrapper
Link to comment
Share on other sites

Hmmm, to be honest I can't really see where the problem might be ;) ...

Download the Service Management UDF by Xenobiologist.

Compile and start our code from above.

Use this code to turn of the Windows Update Service and see if an Update to the Log then happens.

#include<Service Management.au3>

While _ServiceRunning("", "wuauserv")
    Switch MsgBox(4 + 64 + 262144, "Error", "The Windows Update service is running. Do you want to try and stop it manually?")
        Case 6
            _StopService("", "wuauserv")
        Case Else
            Exit
    EndSwitch
WEnd

MsgBox(64+262144,"","wuauserv Service is stopped.")

While not _ServiceRunning("", "wuauserv")
    Switch MsgBox(4 + 64 + 262144, "Error", "The Windows Update service is not running. Do you want to try and start it manually?")
        Case 6
            _StartService("", "wuauserv")
        Case Else
            Exit
    EndSwitch
WEnd

MsgBox(64+262144,"","wuauserv Service is started.")

If that works, the service needs to be disabled / enabled periodically to flush the WindowsUpdate.log... just a guess :blink:

Edited by KaFu
Link to comment
Share on other sites

  • 10 months later...

I'm sure this is inconsequential but I recently tried to make an autoit script for monitoring a log file created by a program and found this thread extremely helpful (I had most of it down but I was having trouble with getting the editbox to accept the entire log file and this helped in that regard with the "GUICtrlSetLimit(-1, 0x7FFFFFFF)" function). I found that using the "@extended" macro helped in making sure I always had the correct position within the file I was monitoring. I have added/changed the script to work with the intended effect. I thought I would post here in case anyone else found themselves in need of monitoring a log file.

;Coded by UEZ Build 2010-06-30, tweaked by KaFu ;-), then again by KB.
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#include <GuiEdit.au3>
Opt("GUIOnEventMode", 1)

Global $iMemo, $new_line
$width = 1024
$height = 600
$hGUI = GUICreate("Realtime Log Reader by UEZ & KaFu 2010", $width, $height, -1, -1, Default, $WS_EX_TOPMOST)
$iMemo = GUICtrlCreateEdit("", 0, 0, $width, $height, $ES_AUTOVSCROLL + $WS_VSCROLL + $WS_HSCROLL + $ES_READONLY)
GUICtrlSetLimit(-1, 0x7FFFFFFF)
GUICtrlSetFont($iMemo, 8.5, 400, 0, "Lucida Console")
GUISetState()
If $CmdLine[0] > 0 And FileExists($CmdLine[1]) Then
    $file = $CmdLine[1]
Else
    $file = @WindowsDir & "\WindowsUpdate.log"
    ;$file = @ScriptDir & "\WindowsUpdate.log"
EndIf

$hFile = _FileOpen_Wrapper($file)
$txt = FileRead($hFile)
$fs = FileGetSize($file)
$OrigCount = @Extended
FileClose($hFile)
ConsoleWrite($txt)
_GUICtrlEdit_SetText($iMemo, $txt)
_GUICtrlEdit_LineScroll($iMemo, 0, 0xfffffff)

GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")

While Sleep(1000)
    $fs_new = FileGetSize($file)
    If $fs < $fs_new Then
        $hFile = _FileOpen_Wrapper($file)
        If $hFile <> -1 Then
            FileSetPos($hFile, $OrigCount, 0)
            $new_line = FileRead($hFile)
            FileClose($hFile)
            $NewCount = @extended
            _GUICtrlEdit_AppendText($iMemo, $new_line)
            $OrigCount = $OrigCount + $NewCount
            $fs = $fs_new
        EndIf
        $new_line = ""
    EndIf
WEnd

Func _Exit()
    GUIDelete($hGUI)
    Exit
EndFunc   ;==>_Exit

Func _FileOpen_Wrapper($file)
    $hFile = -1
    $timer = TimerInit()
    While $hFile = -1
        $hFile = FileOpen($file,128)
        If $hFile <> -1 Then ExitLoop
        Sleep(100)
        If TimerDiff($timer) > 5000 Then
            MsgBox(48, "Access Error", "File" & @CRLF & $file & @CRLF & "could not be opend in 5 seconds...")
            Exit
        EndIf
    WEnd
    Return $hFile
EndFunc   ;==>_FileOpen_Wrapper
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...