How to write script file to run MingW
===

I am trying to compile some programs from source and use `MinGW` to compile them.

In the documentation, it recommends using a script file to do it, to avoid permanently adding the `MinGW` program to the `PATH` variable.

I have 2 questions:

1) What is the best way to implement this script file?  Just write a `.bat` file and change details (ie location of source files, etc.) before each use?

2) What is the best way to get and set the `PATH` variable programatically?  Is there some way I can write a script along these lines:

    oldPath = getCurrentPath()
    newPath = oldPath + "; c:/MingGW/bin"
    setCurrentPath(newPath)
    
    make ...
    make install...
    ...

    setCurrentPath(oldPath)

Any suggestions would be great.
