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

DOS

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

Running DOS.Bat files in background

Keywords:        icon dos script run launch wbt

Here is a quick pass at trying to allow the user to click an icon and run your batch files - invisibly. First of all you need a WinBatch WBT file, a sample one follows, and a new DOS BAT file, a sample also follows. Next you need a PIF file to accompany the BAT file. For most items in the PIF file, the default values are fine. However, be sure the following items are checked in the PIF file:

The top and bottom lines of the following WBT should be "RUNWAIT" functions until you get it debugged, then they may be changed to RunHideWait. You must also make sure that the NWSHAREHANDLES box is the Windows Control Panel Network section is checked for this to work.

;LEE.WBT FILE:

   RunWait("SAMP.BAT","ATTACH")    ; change to RunHideWait when debugged
   RunWait("WONET.EXE","-O CANCER")
   DirChange("C:\OVID")
   RunWait("OVIDW.EXE","")
   RunWait("SAMP.BAT","DETACH")    ; change to RunHideWait when debugged

REM SAMP.BAT FILE:

   if %1=="ATTACH" goto DOATTACH
   if %1=="DETACH" goto DODETACH
   goto byebye

   :DOATTACH

      ATTACH UTC\CDP_DOC
      MAP INSERT S3: = UTC\SYS:OPTINET
      MAP INSERT S4: = UTC\SYS:OVID
      GOTO BYEBYE

   :DODETACH

      MAP DEL S3:
      MAP DEL s4:
      LOGOUT UTC

    :BYEBYE

      Exit


Article ID:   W12901
Filename:   Running DOSBat files in background.txt
File Created: 1999:04:15:16:50:24
Last Updated: 1999:04:15:16:50:24