I activated Windows Terminal as the default terminal application. I.e., also when starting cmd.exe, Windows Terminal is opened. Since I did that, my macro starting a Java application no longer works. As soon as I change WT settings back to console host as the default, it works again. The crucial part of macro is:
Code: Select all
RunWait %comspec% /c "java -Dfile.encoding=UTF-8 -jar "%JAR%" "%TEMP_FILE%" > "%TEMP_FILE%.x""
If I change "%comspec%" to "wt.exe", it works. But I am auto-syncing my AHK scripts to several computers via cloud storage, and not all of them might have wt.exe installed. Is there any way to create the RunWait command in such a way that it works regardless of the default terminal cmd.exe or wt.exe? I am not expecting it to work in other shells such as PowerShell or Git Bash.