Issue:
I am getting the Maven error \"The JAVA_HOME environment variable is not defined correctly\" when I run through Inno setup batch execution. Howe
The SETX command does not modify the current environment.
SETX
If you run the following batch file:
setx AAA aaa echo AAA=%AAA%
It will print
AAA=
So your batch file is wrong. You have to use set:
set
set AAA=aaa
See What is the difference between SETX and SET in environment variables in Windows.