How do I create command line software that works in MS-DOS mode?

Hi, I was wondering why the console app that I made works in the MS-DOS prompt under Windows, but doesn't work under MS-DOS mode, when booting from an emergency disk. Any ideas



Answer this question

How do I create command line software that works in MS-DOS mode?

  • John Ferrell

    By the way, would a simple console C++ app with just the standard library, IOSTREAM and something to read and write files, work on a bootable disk in MS-DOS mode


  • amisner2k

    Aww...
    Is there any way to disable the .NET framework and use a simpler framework And if so, how do I do it


  • lokeshbhatnagar

    No.

  • James Bender

    OK thank you very much for your help.

    I'm going to download BartPE and see what I can do with it.


  • Keith Blackham

    Thanks for your suggestions.
    Just to clarify, storage space is not really an issue, as I am not using a floppy disk but a DVD.


  • Andrew Tweddle

    By default you cannot just say “use this kind of framework instead”... in theory though you could take something like Mono and strip it down to such a point that it was able to fit on to your disk and run your code... Another option would be to build your disk to be not MS-DOS but an embedded version of Windows like a stripped down Windows CE that ran the Compact Framework and would then in theory be capable of running your app.

    One other option, and just as difficult as the others would be to try to load the .NET Framework in a Windows PE environment. The major problem with this route is that that PE is not very easy to setup however you might look into BartPE and this plugin.

    Alternatively you could write your application in C/C++ or another language that has a compiler that targets that sort of environment and avoid the necessities of getting the a .NET framework to work in such an environment.



  • rodrigobenin

    A C/C++ app can use IOSTREAM and has ready access to files... the issue you will run into though is using a compiler that supports your environment.

    If you were to build a C/C++ application with say... Visual Studio 2005, it would require Windows and the appropriate C/C++ runtime in order to run and would run into a similar issue as using a .NET app in a non Windows environment. One way around this is to use a C/C++ compiler that doesn’t dynamically link against other libraries and expect them to be available at runtime but instead links the needed external libraries into your application in such a way that it is able to run without an external runtime.

    Unfortunately though this C/C++ talk is well beyond the Visual Basic Express forum and this entire forum in general (which focuses on Windows programming) and you would not be likely to find much in the way of answers in the C/C++ direction here.



  • stevensrf

    Any application you make in Visual Basic Express requires the 2.0 .NET Framework which unfortunately is far too large to be able to run from most emergency disks. To add insult to injury though the framework also ties into Windows in such a way that some sort of Windows environment is required to run it, something else that would not easily fit on or be run from such a disk.



  • How do I create command line software that works in MS-DOS mode?