You could define some environment variables in windows. For linux users, this should feel familiar.
C:\> SET VARIABLE_NAME="path\to\dir"
sets the environment variable
VARIABLE_NAME to that path. Windows will then replace
%VARIABLE_NAME% with whatever you put in the quotes, whether it's valid or not. (If it's not, it'll throw an error.) For example, you could list the contents of the path using dir as follows:
C:\> dir %VARIABLE_NAME%
You could create a .bat file that will set these environment variables and then call the appropriate build script. Environment variables are only valid for the life of the script calling them.
But that's really not what you should be doing. You should be using a build tool.
Build tools are going to allow you to have a lot more control over your builds, managing dependencies and project lifecycles. You should consider moving to one to try and ease some of the build related pains you're feeling now. Currently there are 3 big names in the build community. I've included links to the project pages, with a brief description below.
Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information
Apache Ant is a Java library and command-line tool whose mission is to drive processes described in build files as targets and extension points dependent upon each other. The main known usage of Ant is the build of Java applications. Ant supplies a number of built-in tasks allowing to compile, assemble, test and run Java applications. Ant can also be used effectively to build non Java applications, for instance C or C++ applications. More generally, Ant can be used to pilot any type of process which can be described in terms of targets and tasks.
Gradle is build automation evolved. Gradle can automate the building, testing, publishing, deployment and more of software packages or other types of projects such as generated static websites, generated documentation or indeed anything else.