|
Post by George on Dec 29, 2023 14:31:34 GMT -5
Hi, For a long time, after Microsoft eliminated desktop gadgets, I used 3rd party tools to recreate the gadgets I used the most. Then, as a programming exercise, I created my own tool I named "InfoBar". I've used this for quite a while, so over the Xmas break, I cleaned it up a bit and decided to make it available for others. So here it is: It can reside in any of the 4 corners of your desktop, and comes in a DARK and LIGHT version. The attached download contains 2 files, the EXE and the control file. Simply unzip it anywhere and execute it from that folder. The InfoBar.TXT file, which controls the operation contains a sample config and instructions for usage. There is no other documentation. I'm pretty sure this will operate on other systems, but obviously I have not tested this, so feedback is appreciated. It should operate properly with different Windows text settings (100%, 150% etc.) Happy New Year! George InfoBar.zip (783.87 KB)
|
|
|
Post by Jo on Dec 30, 2023 11:04:20 GMT -5
Thanks for this nice Infobar. I had to deactivate NETWORK and CPU, because there was an error message popup "PDHInit failed". I've no idea what that means or what is missing. I run Win10-pro 64bit on Lenovo ThinkCentre, 2 screens 100% 1280x1024
Jo
|
|
|
Post by George on Dec 30, 2023 11:21:31 GMT -5
Jo: I'm not surprised. Try just CPU, that one should be OK, Network is the buggy one. I used to just have an entry in the control file where the name of the active network adaptor was specified, kinda crude. So I tried to determine the name internally. Well, despite a lot of support from guys in the PB forum, there was no guaranteed piece of code that worked, especially if you have a VPN active, which I do.
I may go back to the manual entry, even though that way has it's problems. e.g. If I go into Network settings, and pick my adaptor. It says:
"Intel(r) Wi-Fi 6 AX201 160MHz"
But the name that the WMI interface correctly responds to is:
"Intel[r] Wi-Fi 6 AX201 160MHz"
It took me ages to figure out that subtle difference, and I don't remember now how I found it. There's certainly no Doc. anywhere describing why, or how, someone is supposed to figure it out.
Try InfoBar with just CPU to see if that works and let me know (it should). I think I'll put back the manual network adaptor name, the routine I kludged together obviously doesn't work properly.
George
|
|
|
Post by Jo on Dec 30, 2023 12:16:12 GMT -5
I've tried just CPU, and the same popup "PDHInit Failed" Jo
|
|
|
Post by George on Dec 30, 2023 12:33:32 GMT -5
Jo: Very surprising. I'm not sure where that could go wrong, all that's needed is to know the # of CPUs, and that's trivial to determine.
I've just uploaded a revised version. The sample TXT file shows the new NETNAME = your-adaptor-name. so perhaps you could try that out.
I'll check out CPU startup, maybe I can spot where it might be stumbling.
George
|
|
|
Post by Jo on Dec 30, 2023 12:57:28 GMT -5
Microsoft Defender asserts Trojan:Win32/Wacatac.B!ml and removed the .exe file. Took me some time to undo that. But, same result: popup "PDHInit Failed"
Jo
|
|
|
Post by George on Dec 30, 2023 13:33:56 GMT -5
Jo: Hmmm, yes, Defender here just started popping messages. Probably refreshed it's virus files. I had to do like you and exempt it. Odd, it had never complained before, but then, in order to get the file size reduced so I could post it on the forum, I had to run it through the UPX compressor. I have seen in the past that UPX compressed file seem to trigger false positives.
As to the PDH failures, I'm stumped. Maybe I can add some temp debug code and see if a more detailed error diagnostic can be seen.
What version of Windows are you on? I'm on Win11.
George
|
|
|
Post by Jo on Dec 30, 2023 13:43:24 GMT -5
I'm on Win10-pro 64bit, a Lenovo ThinkCentre (not upgradeable to Win11)
Jo
|
|
|
Post by George on Jan 4, 2024 11:35:29 GMT -5
Jo: If you have time I'd like you to try another version. I've added some debug stuff to display the actual failing return code. It will appear in a separate debug window which SHOULD remain open while the normal Error popup is waiting for an OK.
If you can grab a screenshot at that point it would be a big help.
The link in the 1st post has been updated to the new version
George
|
|
|
Post by Jo on Jan 4, 2024 13:14:57 GMT -5
George: I tried this debug-version with your InfoBar.txt: 1.) only changed NETNAME = Intel(R) Ethernet Connection I217-LM
2.) changed LAYOUT ....,CPU,Network
Jo
|
|
|
Post by George on Jan 4, 2024 13:56:16 GMT -5
Jo: Great, I have an error code to lookup, many thanks.
George
|
|
|
Post by George on Jan 4, 2024 15:57:34 GMT -5
Jo: This gets interesting. The basic problem is that InfoBar requests performance data using unique names. The error being returned is simply the system saying 'I don't recognize the name'. Seems to be 2 basic possibilities: The performance counters have been turned off. You can check this registry entry. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfProc\Performance\Disable Performance Counters it should be either missing or set to (0) zero.
Or, the systems locale is non-English, as InfoBar requests processor data using "\Processor(*)\Percentage processor" where 'Percentage Processor' may need to be in the locale language.
Does either of these relate to your system?
George
|
|
|
Post by Jo on Jan 4, 2024 17:03:26 GMT -5
ah, yes, my systems locale is non-English. Jo
|
|
|
Post by George on Jan 5, 2024 10:50:31 GMT -5
Jo: OK, I think then I need to allow the name to be in the .TXT file. But I need to provide something to just list what's being used by the system. It never ceases to amaze me how awkward MS makes all of this.
George
P.S. Try NETWORK again and alter your Intel adapter name from (R) to [R]. That's what I had to do even though Network settings displayed the name with (R). PDHQuery only worked after changing it to [R].
Might be worth a try.
G.
|
|
|
Post by Jo on Jan 6, 2024 8:59:05 GMT -5
George: changed (R) to [R], but I think the name does not reach the destination due to error C0000BB8. Jo
|
|