VOGONS


First post, by RrnR

User metadata
Rank Newbie
Rank
Newbie

Is there any clean way of setting an environment variable on the command line that starts DOSBox? I ca'n see anything mentioned in the command-line parameters. What I want is something like:

DOSBox  C:\Folder -setenv name=fred  -c MyCommand.bat

such that I can reference %Name% within the DOSBox session.

TIA, R

Reply 1 of 2, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

You can use -c more than once, so:

dosbox.exe -c "set name=fred" -c MyCommand.bat

Reply 2 of 2, by RrnR

User metadata
Rank Newbie
Rank
Newbie

Obvious when I think of it! Many thanks for the quick reply.