WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Why is RunWait Not Working?

Keywords: runwait 

Question:

I have created a 16 bit WinBatch script using RunWait. The RunWait is running a 32bit application and it is not waiting for the 32-bit application to close before it continues to process. I've found that sometimes RunWait doesn't wait (the batch script continues before the application ends), sometimes RunWait waits forever (the application terminates normally but the batch script fails to continue), and sometimes RunWait works just fine.

The application is 32 bit running in Windows 3.1 with Win32s version 120.

Answer:

We can't really support Win32S.

RunWait will fail if your WinBatch version does not match your Windows Environment. For example, the RunWait command from 16 bit WinBatch will not run under Windows 95 or NT. Therefore the 16 bit version of WinBatch can Runwait 16 bit applications, and the 32 bit version of WinBatch can runwait 32 bit applications only. The 16 bit WinBatch (on a Win95/NT system) will not Wait on a 32 bit application because it can barely even see it. We recommend 16 bit WinBatch for Windows 3.x and Windows for Workgroups (with or without Win32S). Behavior with a 32 bit app running under Win32S is undefined.

Use 32 Bit WinBatch for Win95/NT.

16 bit WinBatch can run and do *a lot* of stuff in a Win95/NT environment - but not everything. No RunWait on 32 bit apps. No long file names. Bad multitasking.

You may wish to investigate the WinWaitClose function. It can wait based on a Window rather than an EXE.


Article ID:   W13108
Filename:   RunWait 16 bit script doesnt wait for 32 bit apps.txt
File Created: 1999:04:15:16:51:48
Last Updated: 1999:04:15:16:51:48