Jump to content

Case insensitive to process names.


ppat
 Share

Recommended Posts

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.?

Link to comment
Share on other sites

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
Link to comment
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).

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...