Hello all, :)

I think many off you might know the basics off batch files in DOS mode, and also with DOS mode programs. I focusing here on multiple lines batches that would set variables and use them in call to one or more programs. Also is cool to use enviroment variables (like %username%, %systemroot%, and so on)

Based on that (anyone can ask me if you want to, too :) I want to know the following:

If I call a Windoze program from a batch line, passing command line parameteres, and maybe one or more enviroment varibles, how would it differ from a "normal" batch file? The system variables would work as well? Any other things I (and any other who read this thread as well ;) might want to know about it?
Posted on 2002-09-09 18:39:28 by wicr0s0ft
You tend to use batch files to set DOS environment variables. Command line programs like ML.EXE and LINK.EXE read the DOS environment variables so if you set them, you will get the results you are after.

Have a look at the example in MASM32 called ALTBUILD as it uses the DOS environment to set the paths required.

Regards,

hutch@movsd.com
Posted on 2002-09-09 19:19:51 by hutch--
Yes you can set environment variables, but they will be set only for that particular virtual machine, which processes batch file. You can't use them in your windows program. You'll have to place them in autoexec.bat for that.
That's what I think.
Posted on 2002-09-10 06:06:18 by Vaxon
Perhaps I made myself a bit unclear about my question.

I am wondeing about the way command arguments are passed to Win32 program, on the side of DOS mode programs ( LINK.EXE, ML.EXE are DOS programs, arent they? ;)

If I make a prgram that uses the command line argument to decide how to to something, will it be the same, as if it was a DOS program?

Maybe my doubt is pointless here, because it works the same in both type of program. Bt since I have never called a window's program file from a batch before, so Im guessing if is there any tip[s, or cool thing anyuone can do. I already know how to make middle level complex batch's, so working with them is not a problem...

I hope that is a bit clearer that! ;)
Posted on 2002-09-10 12:59:50 by wicr0s0ft