WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: cssyphus on May 24, 2026, 06:19:40 AM

Title: AppExist and WinExeName have stopped working
Post by: cssyphus on May 24, 2026, 06:19:40 AM
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.
Title: Re: AppExist and WinExeName have stopped working
Post by: cssyphus on May 24, 2026, 07:50:44 AM
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.