No announcement yet.

Opening a App with fix set of settings

  • Filter
  • Time
  • Show
Clear All
new posts

  • Opening a App with fix set of settings

    I have a bat file at the moment what sets a few few things

    SET DIR=%cd%
    SET JA_HOME=%DIR%\runtime\jre-x64\1.8.0_25
    SET JA="%JA_HOME%\bin\javaw.exe"
    set APPDATA=%CD%\data
    %JA% -jar "%DIR%\bin\game.jar"
    How can do this in AMS so I don't have to use a bat file at all.

    So I need this part of a run or extract command without the bat file, I can create the bat file each time and delete it I know that but I rather do it little cleaner.

    Plugins or Sources MokoX
    BunnyHop Here

  • #2
    Using a batch file in this case is not a bad idea, because you are changing environment variables only temporarily, just for this game.jar. Most likely, it is not required to make permanent changes to the environment on the user's computer, so discarding these settings once the JAR ends is adequate.

    You could set the environment through code by changing the registry, and then use SendMessage() or this to let Windows know that there was a change in the environment variables, but these changes would persist even after your AMS application was closed. This may not be what is required...



    • #3
      Thanks feller I will for now create and delete the bat
      Plugins or Sources MokoX
      BunnyHop Here