No announcement yet.

The Shell command under WinNT

  • Filter
  • Time
  • Show
Clear All
new posts

  • The Shell command under WinNT

    Im using the PowerBasic Compiler 3.5 for DOS under WindowsNT 4.
    My problem is that I have to start child processes in my program.
    Such like executing a batch file or using DOS-Shell commands like
    md, del, start etc... I know that there are PB commands for that to.
    When I start a batch file it works, but is not able to start
    such processes like md, del, start.
    When I use the shell command standing alone and a shell opens
    I can use those commands. Why? and Is there any way using them?
    And an other question is: Is there a way getting the information
    what the current path is from inside of my Program?

    Thanx for your help!!


  • #2
    I could solve the Problem by writing a new routine.
    Also I found the command CURDIR$.



    • #3
      Like MD and DEL, batch files are handled by the command shell. So, if
      you can run one, you should be able to run the others. Perhaps you could
      show us what you are doing?

      I am not familiar with the START command...?

      Tom Hanlin
      PowerBASIC Staff


      • #4
        That's what I was doing:
        I just wrote an Install program for an other program I've worked on.
        And there was the problem that I wanted to make the directory
        that was inputed (or change there if it exists). Then go back to
        the install directory to make the installation.
        I wanted to let the program use the MD command, because the command
        only creates a directory if there is not one named like that.
        And the mkdir PBcommand can only create if it's not existing.
        But after writing a small SUB with having the knowledge about
        CURDIR$ it was no Problem.
        The start command under NT starts a new shell.

        But Thanx for your support!!