Calling WinBatch.Exe from a DOS BAT File
Keywords: Launch a Compiled WinBatch EXE from a DOS BAT File
To Launch WinBatch from DOS in Windows 3.11/3.1:
The START command is not supported in Windows 3.1/3.11. Your options are more limited here, since you can't run the WB EXE from your DOS batch file. There's a third party utility that might be useful to you, and might still be available, (check with PC Magazine or Ziff-Davis Publishing) called WINSTART, which is a DOS TSR. You'll need to install it on the individual PC, and load it in AUTOEXEC.BAT and your STARTUP GROUP. The limitations are that it will work OK for a single machine implementation, but isn't a good solution if you need to deploy this over a network.A compiled WB EXE cannot be successfully run directly from a user's logon/login script either. Your other options to launch the WinBatch EXE at login include:
- Launch it when Windows comes up with:
win WBEXEnam- Put the WBEXE in the Windows Startup Group.
- Launch the EXE from the WIN.INI file, by adding it to either the:
load=C:\YOURDIR\WBEXENAM.EXEorrun=C:\YOURDIR\WBEXENAM.EXElines.To Launch WinBatch from Windows 95/NT:
Question:
My script is running fine if I run it from Windows Explorer or Start MenuBar, Run menu in Windows 95. But, when I am running from network logon script, one of my users is getting the usual Windows 95 program terminate error. Then after clicking Close, it gives:Err num 1114 (Batch DLL Init Error)Extra Info:
- The logon script is a simple dos batch file.
- The exe is called as: call \\Server\Share\Dir1\subdir\xxxxx.exe
Answer:
When calling the Winbatch EXE from a DOS BAT file, be sure to use the "START" function in the DOS bat file to launch the Winbatch program. This is available in Windows 95/NT only.rem DOS BATCH FILE START COMPILEDWB.EXEorSTART WINBATCH.EXE YOURSCRIPT.WBTIt's not START.EXE it's just START in a DOS batch file. START is an extension to the existing DOS batch commands in Windows 95, and is a NT Command prompt (like DIR and CD and COPY). If wanted to launch successive winbatch scripts from a DOS batch file, then you could use the DOS START command with the /W flag, which would wait for each job to complete before continuing onto the next.Question:
I am running Windows 95 and I cannot get the START command to work from my DOS batch file! Any Suggestions?
Answer:
Make sure that the DOS pif file has the appropriate settings. If you launch the explorer and find MS-DOS Prompt. Right Click on the file, select the Program Tab, click the Advanced button, Make sure "Prevent MS-DOS based programs from detecting Windows" is NOT checked!
Article ID: W12907Filename: Using START to Launch WinBatch.exe from DOS Bat file.txt