Sign in to follow this  
Followers 0
ppat

Case insensitive to process names.

4 posts in this topic

I found out that ProcessClose() or ProcessExists() functions are sensitive to the case of the process name. So I am having a hard time pinning down a specific process that alternatively reports as OperaUSB.exe or as operausb.exe.

What is the trick to make these functions case insensitive, eg. passing "operausb.exe" would match "OperaUSB.exe", "OperaUsb.exe", "operausb.exe", etc.?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I just tested it in 3.3.2.0, and ProcessExists detects 'firefox.exe' if passed either 'FIREFOX.EXE' or 'FiReFoX.eXe'. You'd need to provide more information (or some sample code), because you seem to have misdiagnosed your problem.

Edited by danielkza

Share this post


Link to post
Share on other sites

Here is my diagnosis:

Actual process name is "OperaUSB.exe"

Autoit with "operausb.exe" does not detect it.

The example you give is the other way round (actual process name is only lower case letters).

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Here is my diagnosis:

Actual process name is "OperaUSB.exe"

Autoit with "operausb.exe" does not detect it.

The example you give is the other way round (actual process name is only lower case letters).

Just tested it again. Process name as shown by Task Manager is 'FirefoxPortable.exe'.

This script

Global Const $Processes[4] = [3,"FirefoxPortable.exe", "firefoxportable.exe", "FIREFOXPORTABLE.exe"]
For $i=1 To $Processes[0]
    ConsoleWrite($Processes[$i] & "=" & ProcessExists($Processes[$i]) & @CRLF)
Next

outputs (correctly)

FirefoxPortable.exe=6820

firefoxportable.exe=6820

FIREFOXPORTABLE.exe=6820

I tested before on a lower-cased process (firefox.exe), and now with a mixed case one (FirefoxPortable.exe). Therefore, it works exactly as expected. Maybe you are not running the latest version or something. Edited by danielkza

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0