I would like to make a Minecraft modpack using Minecraft Forge, most likely in Minecraft versions 1.5.2 and older, without using the new Minecraft launcher, since I will be making my own (not cracked, of course). I need it to run the modded Minecraft out of an entirely separate directory from normal Minecraft (Like Tekkit, which runs in
%APPDATA%\.technic\ instead of
%APPDATA%\.minecraft\). Unfortunately, the only way I know of to do this would be to change the %APPDATA% variable on the modpack startup and then restore it to its original value after exiting. This would mean that I cannot have multiple instances of the modpack or Minecraft running at the same time without causing problems with file access and saving. I have also looked at the source code for some modpack launchers, but most of them seem to use some sort of obscure launch method that is inherent in Java or Forge, or so it seems.
Is there a way in Java, Batch scripting, Forge config, or otherwise, that I can launch my modded Minecraft in a certain directory without changing my %APPDATA% environment variable globally?