I'm not entirely sure this is really needed on Windows, but when cross-compiling this allowed to search for the katehighlightingindexer.exe which wouldn't run because I was on Linux...
But in any case if this doesn't break the cross-compile with an external katehighlightingindexer executable I believe this would cause no harm then.
I ended up compiling it using vcpkg toolchain directly on Windows, which showed this isn't required.
In fact even when cross-compiling this won't fix anything because the tool must run on the host OS.
So I only still think this is useful because the user will notice that it tried to compile and run an .EXE which won't work on their host, I don't think this will cause any harm but I didn't test if this still works when specifiyng the indexer path variable.