|What is the language of coding given? What software to run it?|
It is the first time i use dos.
It's an xp batch file. Just a simple text file with either .bat or .cmd extension. Run from command line or by executing from explorer(i.e. double click - but add a "pause" command at the end to stop the window closing).
It is a bat file because the file end with .bat(MS-DOS Batch File).
Fair enough, it was just a guess about .cmd, the reason being that .cmd is essentially equivalent to .bat on nt based system(both run by cmd.exe). The real confusion comes from "hide file extensions of known types" and .cmd having the same icon.
The script will be passed the current directory from the command line, try this
set CYGWIN=nontsec nodosfilewarning
.\bin\bash --login -i
Assuming "bin" is in the same directory as the batch.
"%~dp0" is just a modifer to argument %0(the script that it running) that expands to it's path and drive. Pushd changes and stores the current directory, popd restores the directory from before calling pushd.
One thing I forgot to mention, you don't need the .\ to run a "non-path" executable on the windows command line, the relative path "bin\bash" is sufficient. The .\ (current directory) won't do any harm though....
You could also avoid "pushd" and "popd" by using:
"%~dp0\bin\bash" --login -i
Batch Variable how to