I changed the logic to try the following 3 strategies in order
1. If a well-known script or exe is on the path, use it
2. Try to find mono
3. Use "mono"
For step 1, the names sought are mono.bat, mono.cmd and mono.exe on Windows, otherwise mono and mono.exe
For step 2, Windows examines the registry, nothing implemented on other platforms
I changed the logic to try the following 3 strategies in order
1. If a well-known script or exe is on the path, use it
2. Try to find mono
3. Use "mono"
For step 1, the names sought are mono.bat, mono.cmd and mono.exe on Windows, otherwise mono and mono.exe
For step 2, Windows examines the registry, nothing implemented on other platforms