Detect exe file path correctly for ESR versions