WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: JTaylor on July 29, 2014, 04:48:55 PM

Title: AppExist reports chrome.exe not existing on XP...
Post by: JTaylor on July 29, 2014, 04:48:55 PM
...this issue only occurred on 3 stations and I'm curious if there are any known situations where it would falsely report chrome.exe as not existing when one can see it in the Process List?

Jim
Title: Re: AppExist reports chrome.exe not existing on XP...
Post by: etippelt on July 30, 2014, 12:20:47 AM
How are you applying the code?  Could this be a 32bit v 64 bit issue?  (eg Program Files v Program Files (x86)  )
Also, is Chrome in the same install location on these three machines compared to the others?  If I recall correctly, Chrome will install to different locations depending on whether you are a local admin or a regular user.
Title: Re: AppExist reports chrome.exe not existing on XP...
Post by: JTaylor on July 30, 2014, 06:45:20 AM
Thanks for the reply.   Assuming I understand the thrust of your questions, would the install location matter in regards to the viability of the AppExist() function since it checks to see if the App is running rather than installed?   I've never concerned myself with the install location before when using the function but maybe I've missed something and that is related to the problem?

Jim
Title: Re: AppExist reports chrome.exe not existing on XP...
Post by: stanl on July 30, 2014, 07:43:55 AM
Jim;

So it would appear if you used tproclist()?  I wonder if there is some sort of state chrome could be in where it would fool appexist?
Title: Re: AppExist reports chrome.exe not existing on XP...
Post by: Deana on July 30, 2014, 07:44:02 AM
Quote from: JTaylor on July 30, 2014, 06:45:20 AM
Thanks for the reply.   Assuming I understand the thrust of your questions, would the install location matter in regards to the viability of the AppExist() function since it checks to see if the App is running rather than installed?   I've never concerned myself with the install location before when using the function but maybe I've missed something and that is related to the problem?

Jim

With AppExist and AppWaitClose, any file extension or path information which is part of the 'program-name' parameter is ignored; so, for example

AppExist("c:\temp\notepad.exe")

will return TRUE, if Notepad is running, regardless of what directory NOTEPAD.EXE is actually located in.




Issue
AppExist returns @False when application is running.

Resolution
Performance counters might be disabled on this machine. Check if the following registry key is defined. HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\PerfProc\Performance["Disable Performance Counters"]

Use the 'Exctrlst Tool' or 'Performance Monitor Wizard' to re-enable Performance Counters.

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

Title: Re: AppExist reports chrome.exe not existing on XP...
Post by: Deana on July 30, 2014, 08:25:04 AM
To confirm that it may be a performance counter issue. Try using the optional current session parameter in AppExist. It uses a slightly different method that is not dependent on performance counters.

Code (winbatch) Select
;This assumes you are running chrome in the current session.
result = AppExist("chrome.exe",1)
Title: Re: AppExist reports chrome.exe not existing on XP...
Post by: JTaylor on July 30, 2014, 12:02:12 PM
Thanks.  I'll have the user give it a try.

Jim