One limitation you will have with COMMAND.COM is that it can't use long file names. This means that you will need to limit yourself to 8.3 format for paths and filenames.
Here's an example of what an 8.3 folder name looks like:
"My Received Files" is the long (modern) name. The 8.3 name would be something like "myrece~1". Furthermore, there might not be an 8.3 filename. To see if folders and files have 8.3 names, do the following:
Open a command prompt.
Change to the desired drive and folder.
Type DIR /X <ENTER>
If there is no 8.3 filename or folder name for a file or a folder, then all you will see is the long file name. In other words, COMMAND.COM wouldn't be able to do anything related with those filenames or folder names. This presents a major problem for COMMAND.COM.
There may be other limitations as well which make it impossible to run your program in Windows 7.
Is there any way to deal with this problem? Possibly. If you could somehow assign 8.3 names to everything, then that would address this problem. I'm not sure if you could do that or not. And even if you did it, you might end up with a bunch of unintelligible file and folder names which now will cause problems in Windows 7. Perhaps there is a way to add the 8.3 name without disturbing the long file name in any way. But this approach will be a major hassle for you, if it even works.
A workable solution is probably to install an older OS (one which is compatible with your must-have program) via Oracle VirtualBox, and run your program in the virtual box which has the older OS.
Another possible solution would be to install DOSBOX, a DOS emulator, in Windows 7, and then run your program in a DOSBOX session. To me, this will be the least complicated way to do it, if it works in DOSBOX.