WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: deming on July 07, 2013, 01:25:27 PM

Title: Windows 8 SysTray No longer accessible
Post by: deming on July 07, 2013, 01:25:27 PM
I have this very simple example to access the systray systemtray which used to work fine with both Win7 and Win8. Now it no longer works with Win8. It gives the following error msg: "WIL Extender Error: 271: System error. Unable to determine module names. Offending line is "window1=cWndByWndSpec("Shell_TrayWnd","explorer",2,303,40965)"

Please help.  :D

Here is the code:

AddExtender("wwctl64i.dll")

;Title: User Promoted Notification Area
;ID: 1504
;Class: ToolbarWindow32
;Level: 4
; Default cWndByWndSpec seems OK here
window1=cWndByWndSpec("Shell_TrayWnd","explorer",2,303,40965)
window2=cWndbyid(window1,303)
window3=cWndbyid(window2,0)
ControlHandle=cWndbyid(window3,1504)
tblist=cGetTbText(ControlHandle)

tbitem = AskItemlist('Choose Items to Left Click', tblist, @TAB, @UNSORTED, @SINGLE)

buttonnum=ItemLocate(tbitem,tblist,@TAB)

csetfocus(controlhandle)
cClickToolbar(ControlHandle,buttonnum,1) ; Left Click
Title: Re: Windows 8 SysTray No longer accessible
Post by: td on July 08, 2013, 06:54:31 AM
Sounds like corrupt performance counters.   You can find information on how to repair the counters here

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/Functions+!!~Performance~Monitoring~and~WinBatch~!!.txt
(http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/Functions+!!~Performance~Monitoring~and~WinBatch~!!.txt)
The 'lodctr' utility with the '/R' command line switch is available on Windows 8 and should fix the problem.  Note that you will need to run the 'lodctr' tool from an elevated command prompt.
Title: Re: Windows 8 SysTray No longer accessible
Post by: deming on July 08, 2013, 03:31:53 PM
Thank you!   :D

It worked great and fixed the problem. I did what you suggested at the elevated Windows 8 Command prompt I entered "lodctr /R" and it is all fixed.

Title: Re: Windows 8 SysTray No longer accessible
Post by: kdmoyers on July 09, 2013, 11:13:41 AM
Quote from: td on July 08, 2013, 06:54:31 AMSounds like corrupt performance counters. 
Tony, How did you get from the systray malfunctioning to performance counters?
(I feel like Detective Lestrade, stunned again by Sherlock's leaps of logic.)
Title: Re: Windows 8 SysTray No longer accessible
Post by: td on July 09, 2013, 01:30:17 PM
Not much deductive reasoning or powers of observation need.  The error number made it easy to put the cuffs on the culprit in this whodunit.
Title: Re: Windows 8 SysTray No longer accessible
Post by: cssyphus on July 28, 2022, 05:21:44 AM
Saw the "Unable to determine module names" message today while using RoboScripter in Windows 10.

If you run  [ lodctr /r ] and get error message "Unable to rebuild performance counter setting from system backup store"...

The solution is to run the [ lodctr /r ] command from an elevated CMD prompt.

Note: just because the prompt window title says "Administrator: c:\windows\system32\cmd.exe" doesn't mean it's elevated.

https://www.stevefenton.co.uk/2016/04/unable-to-rebuild-performance-counter-setting-from-system-backup-store/ (https://www.stevefenton.co.uk/2016/04/unable-to-rebuild-performance-counter-setting-from-system-backup-store/)

https://www.computerhope.com/jargon/e/elevated.htm (https://www.computerhope.com/jargon/e/elevated.htm)