Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DosBox - running a Windows application

Status
Not open for further replies.
I have a DOS accounting application that I run on several platforms. Under Windows XP I run it from the command prompt, and on Windows 7 and 8 I would like to run it from DosBox.

However, the accounting application actually makes use of Winword. When it has generated a text file it may execute a command RUN winword.exe <filename.txt>.

This works fine when the accounting application is started from the command prompt (under XP). But when it is started from DosBox, this error is displayed :

This program cannot be run in DOS mode

I get the same result if (at the Dosbox prompt), I key in "winword.exe".

By comparison, if I fire up the normal command prompt and key in the same command, Microsoft Word can be invoked. It seems that DosBox is rather more restrictive. Is there any way round this?

Thanks. Andrew
 
Are you running a 16 or 32 bit version of DOSBox? Also, when you say the "command prompt", do you mean command.com or cmd.exe?
 
Thanks xwb.

The command prompt where the command to run (e.g.) winword.exe is . . .\system32\cmd.exe.

From the window that this displays I can navigate to the OFFICE11 where winword.exe is located, and when I key that in, it creates a Microsoft Word session which does what I want.

Forgive me, I don't know whether my version of DosBox is 16 or 32 bit. It is version 0.74, and I suspect that my Windows 7 machine is a 32-bit machine. It seems that DosBox provides many features similar to DOS, but does not support the facility to run a Windows app (like winword.exe). I just wondered if there is any way round this!

Again, thanks for your help.
 
The short version is that DOSbox emulates DOS not Windows.



 
Why are you wanting to use DosBox then?

DosBox emulates a pure Dos environment with none of the Windows support to run windowed applications.

If you need access to Word, keep using cmd.exe or the command prompt in Windows 7 and 8.






----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Thanks Phil.

The reason that I am running DOSBox is that I have a 32-bit (Clipper) application which used to run under cmd.exe in Windows XP. However it will not run within cmd.exe in Windows 7, because (I understand) this environment only supports 64-bit applications.

Under Windows XP, the cmd.exe environment was both able to run 32-bit applications and also to execute windows commands (like winword.exe).

Under Windows 7 the 32-bit application seems only to run under DosBox, but I then no longer have the ability to call Microsoft Word from it.

I wondered if there was a way round this.

Andrew
 
>do you mean command.com or cmd.exe?

64bit versions of Windows (and the OP has latterly suggested that they are using 64bit) don't have command.com. And that's where the problem starts; command.com is what used to provide backwards compatibility with 16bit applications on the 32bit platforms. An it is 16bit apps that the 64bit platforms won't run. And Clipper apps are 16bit, not 32bit, as far as I remember (unless the code has been recompiled with one of the newer compilers such as Harbour or xHarbour).

 
Depending on version of windows 7, couldn't you just setup a virtual xp machine and run it from there?
 
You can't run a Win7 app (i.e WinWord as required by the OP) directly from the virtual machine. Same limitation as DOSbox, essentially; you are in a walled garden.
 
I tend to agree with strongm. 32 bit apps should pose no issue.

The issue would be if the application was 16 bit.

Have you tried to run the Clpper App in Windows 7? You could even set some parameters for the cmd.exe or even a short cut to command.com to run in XP compatibility mode if necessary.

You can even adjust the extended memory if the App requires it.



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
I am running Windows 7 32 bit. I can run FoxPro DOS just fine, by double-clicking in Explorer and not from a separate DOS session or virtual machine. I can also open MS Word (or various other windows apps) from FoxPro DOS, so you should be able to do the same with Clipper.
W7 64 bit will not run 16 bit apps, but 32 bit will.

Of course, the app you want to run needs to either be available in the PATH environment or you will need to provide the full DOS path to the app. For example, my version of Word resides in c:\Program Files\Microsoft Office\Office14\.
The DOS path is C:\PROGRA~1\MICROS~1\OFFICE14\WINWORD.EXE



-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top