Announcement

Collapse
No announcement yet.

INVALID COMMAND.COM - SHELLING ULTRA SHELL'D EXE

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • INVALID COMMAND.COM - SHELLING ULTRA SHELL'D EXE

    My error pops up during a shell to d:\dosprint a file created by
    PB 3.0c

    The .exe has been treated with the UltraShell utility.

    I am shelling to dosprint.exe.

    The pgm error is: “Invalid COMMAND.COM
    Enter correct name of Command Interpreter (eg , C:\COMMAND.COM)

    Then my win98 screen display is: C>
    plus the keyboard is inactive (press a key and nothing appears
    on screen).

    After re-boot all other win98 things seem to work

    What’s up ?

    I have cloned the command.com to the active dir in c:
    but the problem is still present.

    Thanks all in advance..

    Jim Gillem – Magnum Software

    Thanks all in advance..

    PS has anyone figured out how to run"pgm.exe from a pb exe
    when both have been treated with "Ultrashell" ?




    ------------------

  • #2
    The only reason you will get an "Invalid COMMAND.COM" error message
    is if you have more than one on the hard drive and the program is
    trying to access the wrong one. Check the SET from the DOS prompt
    and make sure the COMSPEC meets the command.com criteria that it
    was booted on.

    BTW, the COMSPEC for windows98 is ususally "C:\WINDOWS\COMMAND.COM"

    ------------------


    [This message has been edited by Mel Bishop (edited June 02, 2002).]
    There are no atheists in a fox hole or the morning of a math test.
    If my flag offends you, I'll help you pack.

    Comment


    • #3
      The ENVIRON$ function will let you winkle the path of the default
      command processor out of the environment. Try something like this:

      SHELL ENVIRON$("COMSPEC") + " /c DOSPRINT.EXE"


      ------------------
      Tom Hanlin
      PowerBASIC Staff

      Comment


      • #4
        Jim,

        The RUN statement verifies that an .exe file was created by PowerBASIC. Since UltraShell changes the header of the .exe file, PowerBASIC will generally not recognize the file as created by PowerBASIC and will, therefore, refuse to run it.

        Possible workaround: You can use EXECUTE to launch another executable, but if I remember correctly, this will consume about you will lose about 4k of memory until the last program ends and returns to DOS. EXECUTE will run any program.

        My analysis of the "Invalid COMMAND.COM" error is the same as Mel's: you might have a copy of COMMAND.COM on your hard disk that came from a different version of the operating system than the one under which you booted. If this is not the case, please let me know, and I will see what we can figure out.

        Alan

        ------------------
        Alan C. Earnshaw
        Information Management Systems, Inc.
        http://www.infoms.com
        Alan C. Earnshaw
        Information Management Systems, Inc.
        http://www.infoms.com

        Comment


        • #5
          Long time no hear Alan... good to see you are still kicking.

          Anyway, to clear one point, you can certainly SHELL to DOSPRINT from EXE's treated with UltraShell... I have this combination running in sites scattered all over the world.

          A COMMAND.COM issue seems much more likely.


          ------------------
          Lance
          PowerBASIC Support
          mailto:[email protected][email protected]</A>
          Lance
          mailto:[email protected]

          Comment

          Working...
          X