1

I have a lengthy build operation which calls several batch files in succession. Most of these batch files start 32-bit compilers, etc, but one of them involves running a legacy MS-DOS 16-bit app which for good reasons I can't avoid.

No problem, until I moved to a Win64 system, which of course chokes on 16-bit programs.

My workaround has been to run XP 32-bit in a VirtualBox VM, but it is manual step in what would otherwise be a completely unattended build.

What I want to do is start the VM from a command line, then run a batch file inside the VM, and then close the VM and return control to my "master" batch file.

Is this going to be possible?

1
  • 2
    If you let XP start/shutdown together with the VM, starting a batch files is as simple as putting them in the Start(up) startmenu folder. The guest OS should of course be configured to not require a login.
    – Jan Doggen
    Feb 5, 2014 at 16:11

2 Answers 2

1

Thought about using DOSBox? You'd be able to invoke that from a batch file etc which would allow for completely unattended builds and would mean you could have it directly access your codebase and leave the resultant build there too, rather than within some VM's disk.

http://www.dosbox.com/wiki/Basic_Setup_and_Installation_of_DosBox will get you started

3
  • I initially started down the DosBox path ans it looked encouraging but soon came unstuck because of the limited support for batch files (no setlocal, if (..)).
    – rossmcm
    Feb 5, 2014 at 22:09
  • Oh I apologise, I wasn't aware that its not a full MSDOS implementation. All I could think would be to take everything out of it and just pass flags from a batch file on the host side when you invoke your compiler, but of course I don't know the specifics so I'm sure you may well have reasons for not doing that. Maybe a VMWare appliance with an autoexec.bat, aside from that, no clue I'm afraid
    – arpz
    Feb 6, 2014 at 8:28
  • Thanks for your input @arpz. One of the factors I didn't mention in the OP is that I run these builds on two machines (work/home) and one runs XP, the other Win8. I can get DOSBox running and mount a drive such that it "looks" like my C: drive no problem, so the batch files would be running in a DOSBox environment that looks identical to the environment in the Windows XP machine, so it's a shame DOSBox doesn't implement some of the crazier nuances of batch files.
    – rossmcm
    Feb 6, 2014 at 19:05
0

You could try creating a shared folder for the VM and putting your batch file(s) in it. From what I'm thinking, it would require some degree of manual intervention.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .