title: WildFly add-user.bat The system cannot find the path specified
body: <p>When I try to run add-user.bat, cmd output that it cannot find the path specified and I really don't know what the problem is so if any of you can help me out that would be great.</p>
  
  <p>I already tried to hard code path to my java instead of using JAVA_HOME variable, like it says on this site: <a href="http://@echo%20off%20rem%20-------------------------------------------------------------------------%20rem%20Add%20User%20script%20for%20Windows%20rem%20-------------------------------------------------------------------------%20rem%20rem%20A%20simple%20utility%20for%20adding%20new%20users%20to%20the%20properties%20file%20used%20rem%20for%20domain%20management%20authentication%20out%20of%20the%20box.%20%20rem%20$Id$%20%20@if%20not" rel="nofollow noreferrer" title="%ECHO%quot; == quot;quot;  echo %ECHO% @if quot;%OS%quot; == quot;Windows_NTquot; setlocal  if quot;%OS%quot; == quot;Windows_NTquot; &#40;   set quot;DIRNAME=%~dp0%quot; &#41; else &#40;   set DIRNAME=.\ &#41;  pushd quot;%DIRNAME%..quot; set quot;RESOLVED_JBOSS_HOME=%CD%quot; popd  if quot;x%JBOSS_HOME%quot; == quot;xquot; &#40;   set quot;JBOSS_HOME=%RESOLVED_JBOSS_HOME%quot; &#41;  pushd quot;%JBOSS_HOME%quot; set quot;SANITIZED_JBOSS_HOME=%CD%quot; popd  if /i quot;%RESOLVED_JBOSS_HOME%quot; NEQ quot;%SANITIZED_JBOSS_HOME%quot; &#40;    echo.    echo   WARNING: The JBOSS_HOME ^&#40;quot;%SANITIZED_JBOSS_HOME%quot;^&#41; that this script uses points to a different installation than the one that this script resides in ^&#40;quot;%RESOLVED_JBOSS_HOME%quot;^&#41;. Unpredictable results may occur.    echo.    echo       JBOSS_HOME: quot;%JBOSS_HOME%quot;    echo. &#41;  rem Setup JBoss specific properties if quot;x%JAVA_HOME%quot; == quot;xquot; &#40;   set  JAVA=java   echo JAVA_HOME is not set. Unexpected results may occur.   echo Set JAVA_HOME to the directory of your local JDK to avoid this message. &#41; else &#40;   set quot;JAVA=%JAVA_HOME%\bin\javaquot; &#41;  rem set default modular jvm parameters setlocal EnableDelayedExpansion call quot;!DIRNAME!common.batquot; :setDefaultModularJvmOptions quot;!JAVA_OPTS!">Solution I found but didn't work</a></p>
  
  <p>I use WildFly 16.</p>
  
  <p>Script stops here: (at call "!DIRNAME!common.bat" :setDefaultModularJvmOptions "!JAVA_OPTS!")</p>
  
  <pre><code>@echo off
  rem -------------------------------------------------------------------------
  rem Add User script for Windows
  rem -------------------------------------------------------------------------
  rem
  rem A simple utility for adding new users to the properties file used
  rem for domain management authentication out of the box.
  
  rem $Id$
  
  @if not "%ECHO%" == ""  echo %ECHO%
  @if "%OS%" == "Windows_NT" setlocal
  
  if "%OS%" == "Windows_NT" (
    set "DIRNAME=%~dp0%"
  ) else (
    set DIRNAME=.\
  )
  
  pushd "%DIRNAME%.."
  set "RESOLVED_JBOSS_HOME=%CD%"
  popd
  
  if "x%JBOSS_HOME%" == "x" (
    set "JBOSS_HOME=%RESOLVED_JBOSS_HOME%"
  )
  
  pushd "%JBOSS_HOME%"
  set "SANITIZED_JBOSS_HOME=%CD%"
  popd
  
  if /i "%RESOLVED_JBOSS_HOME%" NEQ "%SANITIZED_JBOSS_HOME%" (
     echo.
     echo   WARNING: The JBOSS_HOME ^("%SANITIZED_JBOSS_HOME%"^) that this script uses points to a different installation than the one that this script resides in ^("%RESOLVED_JBOSS_HOME%"^). Unpredictable results may occur.
     echo.
     echo       JBOSS_HOME: "%JBOSS_HOME%"
     echo.
  )
  
  rem Setup JBoss specific properties
  if "x%JAVA_HOME%" == "x" (
    set  JAVA=java
    echo JAVA_HOME is not set. Unexpected results may occur.
    echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
  ) else (
    set "JAVA=%JAVA_HOME%\bin\java"
  )
  
  rem set default modular jvm parameters
  setlocal EnableDelayedExpansion
  call "!DIRNAME!common.bat" :setDefaultModularJvmOptions "!JAVA_OPTS!"
  </code></pre>