Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Wait for Shell script to finish

Wait for Shell script to finish

Scheduled Pinned Locked Moved Visual Basic
linuxtoolsquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    New_Coder
    wrote on last edited by
    #1

    I am writing in VB6 I have a "shell" script in my code that runs a small exe conversion program. Shell "my_exe.exe" I want to pause the subsequent code until this program has time to finishes I have put in a loop A = 100000000 Do While A > 0 A = A - 1 Loop But this is really slow. Does anyone know a better way to code this?

    D 1 Reply Last reply
    0
    • N New_Coder

      I am writing in VB6 I have a "shell" script in my code that runs a small exe conversion program. Shell "my_exe.exe" I want to pause the subsequent code until this program has time to finishes I have put in a loop A = 100000000 Do While A > 0 A = A - 1 Loop But this is really slow. Does anyone know a better way to code this?

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      A little Google goes a long way toward finding a solution[^] to the problem. VB6 does not have the ability to do this on its own. You have to use the Win32 API to do it.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      N M 2 Replies Last reply
      0
      • D Dave Kreskowiak

        A little Google goes a long way toward finding a solution[^] to the problem. VB6 does not have the ability to do this on its own. You have to use the Win32 API to do it.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        N Offline
        N Offline
        New_Coder
        wrote on last edited by
        #3

        Thanks the following code did what I was looking for DIM My_Shell Set My_Shell = CreateObject("WScript.Shell") My_Shell.Run "my_exe.exe"

        1 Reply Last reply
        0
        • D Dave Kreskowiak

          A little Google goes a long way toward finding a solution[^] to the problem. VB6 does not have the ability to do this on its own. You have to use the Win32 API to do it.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          M Offline
          M Offline
          MartyK2007
          wrote on last edited by
          #4

          and sometimes people still need to ask as they havent got the correct phrase in the google search box i.e. vb6 wait for process to exit would not have been my first choice for a search phrase. :) Martin

          life is a bowl of cherries go on take a byte

          D 1 Reply Last reply
          0
          • M MartyK2007

            and sometimes people still need to ask as they havent got the correct phrase in the google search box i.e. vb6 wait for process to exit would not have been my first choice for a search phrase. :) Martin

            life is a bowl of cherries go on take a byte

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            And knowing how to do research is the most important skill you can have doing development work.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007

            M 1 Reply Last reply
            0
            • D Dave Kreskowiak

              And knowing how to do research is the most important skill you can have doing development work.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007

              M Offline
              M Offline
              MartyK2007
              wrote on last edited by
              #6

              ah if only there was a course that told me to use process instead of application or program - sigh!! Martin

              life is a bowl of cherries go on take a byte

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups