![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | hta must start cmd, wait, start another cmd Good day everone, I'm writing a HTA that will run several cmd-files. However, certain cmd I will not allowed to run at the same time. E.g. n03.cmd must be finished before n08.cmd is allowed to be launched. How can this be achieved? Dramklukkel -- I fixed it right the first time. It must have failed for other reasons. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: hta must start cmd, wait, start another cmd Dramklukkel wrote: Quote: > Good day everone, > > I'm writing a HTA that will run several cmd-files. However, certain > cmd I will not allowed to run at the same time. E.g. n03.cmd must be > finished before n08.cmd is allowed to be launched. > How can this be achieved? > > Dramklukkel you check for process completion. http://msdn.microsoft.com/en-us/libr...4a(VS.85).aspx Hope that helps. Regards, Mark D. MacLachlan -- |
My System Specs![]() |
| | #3 (permalink) |
| | Re: hta must start cmd, wait, start another cmd Mark, thanks for your reply. I found the following code: '--------- Dim WshShell, oExec Set WshShell = CreateObject("WScript.Shell") Set oExec = WshShell.Exec("calc") Do While oExec.Status = 0 WScript.Sleep 100 Loop WScript.Echo oExec.Status '--------- I replaced the "WScript.Echo" with "Msgbox", since HTA does not seem to like WScript things. However I do not get the "WScript.Sleep 100" to work. WScript thingy again. I tried "iTimerID = window.setInterval("RunScript", 5000, "VBScript")" to no avail. Any hints? Dramklukkel "Mark D. MacLachlan" wrote: Quote: > Dramklukkel wrote: > Quote: > > Good day everone, > > > > I'm writing a HTA that will run several cmd-files. However, certain > > cmd I will not allowed to run at the same time. E.g. n03.cmd must be > > finished before n08.cmd is allowed to be launched. > > How can this be achieved? > > > > Dramklukkel > Use the WSHShell.Exec method instead or WSHShell.Run. This will let > you check for process completion. > > http://msdn.microsoft.com/en-us/libr...4a(VS.85).aspx > > Hope that helps. > > Regards, > > Mark D. MacLachlan > > > -- > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: hta must start cmd, wait, start another cmd Dramklukkel wrote: Quote: > Mark, > thanks for your reply. > I found the following code: > '--------- > Dim WshShell, oExec > Set WshShell = CreateObject("WScript.Shell") > Set oExec = WshShell.Exec("calc") > Do While oExec.Status = 0 > WScript.Sleep 100 > Loop > WScript.Echo oExec.Status > '--------- > > I replaced the "WScript.Echo" with "Msgbox", since HTA does not seem to like > WScript things. > However I do not get the "WScript.Sleep 100" to work. WScript thingy again. > I tried "iTimerID = window.setInterval("RunScript", 5000, "VBScript")" to no > avail. > Any hints? This popped up as the first hit on google search: http://www.big-fly.net/oa5599/?p=11 -- -- HAL07, Engineering Services, Norway |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| WLAN AutoConfig won't start | Windows Wireless Service won't start.... | Network & Sharing | |||
| Getting problem to start outlook box for windowlive.com account what to do to start? | Vista mail | |||
| VIsta The following boot-start or system-start driver(s) failed to load: | Drivers | |||
| Permission needed to start a specific program in the Start Menu | Vista installation & setup | |||
| Is there an equivalent of the DOS shell "start /wait" in PowerShel | PowerShell | |||