AppExist and WinExeName have stopped working

Started by cssyphus, May 24, 2026, 06:19:40 AM

Previous topic - Next topic

cssyphus

It appears that both AppExist and WinExeName have stopped working on my machine. Both are frequently used in my daily-run systray script.

System details:
Windows 10 (10.0.18362.145)
WinBatch 2025A

For example, if I start Windows Notepad (notepad.exe) and run the commands:

xx = appExist("notepad.exe")
yy = winExeName("Notepad")

xx will equal 0
yy will equal "" (empty parentheses)

I have a suspicion regarding which program did this... I rarely, rarely install software. A few weeks back I installed a Snippets app for Outlook** and the problem seems to have happened around that time.

** https://xequte.com/textlightning/download.html (most popular Snippets app for OL2016)

Is there a DLL or etc that might be damaged and that I could try replacing? I thoroughly uninstalled Text Lightning, but the WBT functionality remains broken.

cssyphus

I am a late adopter re AI / ChatGPT... otherwise this question would not have been written. So, answering my own question, thanks to ChatGPT, here is the solution for the record.

ChatGPT advised that this is a known situation with an easy fix (yay!)

Both appExist() and winExeName() rely on the Windows Performance Monitor subsystem. The suggested test was to run perfmon.exe at an administrative cmd prompt - and I immediately saw errors about being unable to load counters.

The suggested solution was to run two commands and then reboot:

lodctr /R

winmgmt /resyncperf

I then rebooted and everything was once again working. I can't believe I suffered for weeks because I couldn't imagine ChatGPT knowing the answer. Sheesh. Lesson learned.



td

The ChatGPT bot regularly trolls both this forum and the TechDatabase. Both have or had information about repairing Windows performance counters. That is likely why the model was able to answer your question as it relates to WinBatch.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

SMF spam blocked by CleanTalk