run a dos command

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rodchar

    #1

    run a dos command

    hey all,

    how do i run a dos command from vb and make sure that the dos command
    completes before proceeding back to vb?

    thanks,
    rodchar
  • Chris

    #2
    Re: run a dos command

    rodchar wrote:[color=blue]
    > hey all,
    >
    > how do i run a dos command from vb and make sure that the dos command
    > completes before proceeding back to vb?
    >
    > thanks,
    > rodchar[/color]

    Use the process class to start your program. The processinfo class will
    gives you more control over it.

    Chris

    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: run a dos command

      "rodchar" <rodchar@discus sions.microsoft .com> schrieb:[color=blue]
      > how do i run a dos command from vb and make sure that the dos command
      > completes before proceeding back to vb?[/color]

      I am curious which command you want to run. Maybe there is a better
      solution. If you want to shell another application, you may want to use the
      code below:

      \\\
      Dim p As Process = Process.Start(" C:\foo.exe")
      p.WaitForExit()
      MsgBox("Program terminated!")
      ///

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      • rodchar

        #4
        RE: run a dos command

        thanks everyone this helped.

        "rodchar" wrote:
        [color=blue]
        > hey all,
        >
        > how do i run a dos command from vb and make sure that the dos command
        > completes before proceeding back to vb?
        >
        > thanks,
        > rodchar[/color]

        Comment

        Working...