Below is a list of three approaches you can use to run an IDL program from Windows Command Line:
1) Launch the IDL commnad-line application and run the program from threre. To do this, you can go Start > All Programs > IDL 8.5 > Tools > "IDL 8.5 Command Line". Or you can enter "C:\Program Files\Exelis\IDL85\bin\bin.x86_64\idl.exe" into a command prompt. If your add program is in the IDL path, you can type "add, 1,2" into the IDL command prompt and it will compile and execute. Otherwise, you can use ".compile " and then enter "add, 1,2" the command.
2) Another option is to use the "-e" switch when launching IDL. For example, if your program is included in the IDL search path, you can enter the following into the command prompt:
"C:\Program Files\Exelis\IDL85\bin\bin.x86_64\idl.exe" -e "add, 1,2"
3) The third option is to generate a ".sav" file of your routine and then use the "-rt" switch to call the routine. You can use the SAVE routine to generate the SAVE file:
http://www.exelisvis.com/docs/SAVE.html
And then you can then use the "-rt" switch with "idlrt.exe" executable to run the routine:
"C:\Program Files\Exelis\IDL85\bin\bin.x86_64\idlrt.exe" -rt=
-David Starbuck
Harris GS