WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

AppExist Fails


Question:

I'm using WinBatch 2005B and I have a little problem with AppExist.

This following line won't work: if AppExist ("vptray.exe") then Message ("Check","Program runs")

Although I see vptray as a running program, Winbatch won't see it that way. I tested it on XP SP 1 and SP2.

Answer:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Functions+!!~Performance~Monitoring~and~WinBatch~!!.txt

Maybe a security change that prevents Winbatch from reading process information of other processes?

User Reply:

Found out that the key [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfProc\Performance] "Disable Performance Counters" on XPSP1 was set to 1. After setting it back 0, AppExist works again on XPSP1, but still not on XPSP2.

More and more it looks like SP2 is the cause of all this. Still not sure where to look to make AppExist work again.

Answer:

Start -> Programs -> Administrative Tools -> Local Security Policy

From there, navigate through "Security Settings -> Local Policies -> User Rights Assigment".

Profile a single process:

Allows a user to run Windows XP Professional performance-monitoring tools to monitor the performance of nonsystem processes.

Default setting: Administrators and Power Users on member servers and workstations. On domain controllers, it is assigned only to Administrators

Profile system performance:

Allows a user to run performance-monitoring tools to monitor the performance of system processes.

Default setting: Administrators

On WinXP Pro SP1 & SP2, the settings for these rights are set identically, with "Profile single process" being granted to "Administrators" and "Power Users". Perhaps this right has been revoked on the WinXP Pro systems in question. If AppExist() truly depends on performance monitoring, then the lack of this right should cause AppExist() to not function properly.

Reference

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Functions+Performance~Counters~Disabled.txt
Article ID:   W16965
File Created: 2014:07:18:09:51:38
Last Updated: 2014:07:18:09:51:38