          RegOpenFlags(1) ; Tell WB to look at 32 bit registry on 64 bit systems
          ErrorMode(@OFF)
          wbdir=RegQueryStr(@REGMACHINE,"SOFTWARE\Wilson WindowWare\WinBatch\CurrentVersion")
          if wbdir==0 
             wbdir=RegQueryStr(@REGMACHINE,"SOFTWARE\Wilson WindowWare\WinBatch Compiler\CurrentVersion")
          endif
          ErrorMode(@CANCEL)
          RegOpenFlags(0) ; Tell WB to resume default registry operations
          if wbdir==0
             Display(5,"Error","Registry entries missing.  Re-install WinBatch")
             exit
          endif
          homedir=strcat(wbdir,"system\")
          ;Message("homedir",homedir)


Two Explorers, side by side
        if WinVersion(5) >= "2-6-0"
           winclass="CabinetWClass"
           classcode=1
        else
           winclass = "ExploreWClass"
           classcode=0
        endif

        a=IntControl(31,classcode,0,0,0)  ;return list of ids of explorer windows
        c=ItemCount(a,@TAB)
        switch c
           case 0
              ShellExecute('explorer.exe',  '/separate,/e,C:\',  DirGet(), @Normal ,   '')
              while FindWindow(winclass)==""    ;wait for it to come up
                TimeDelay(0.1)
              end while
              ;Fall into case 1

           case 1
              TimeDelay(0.3)
              ShellExecute('explorer.exe',  '/separate,/e,C:\',  DirGet(), @Normal ,   '')
              break
           case c       ; 2 or more
              break
        endswitch
        d=1
        while c<2 && d<500
           TimeDelay(0.1)
           a=IntControl(31,classcode,0,0,0)
           c=ItemCount(a,@TAB)
           d=d+1
        endwhile
        if c<2 then exit
        id1=ItemExtract(1,a,@TAB)
        id2=ItemExtract(2,a,@tab)
        TimeDelay(0.75)
        WinPlaceSet(@NORMAL,id2,"500 0 1000 900")
        WinShow(id2)
        WinActivate(id2)
        TimeDelay(0.2)
        WinPlaceSet(@NORMAL,id1,"0 0 500 900")
        WinShow(id1)
        WinActivate(id1)

_&Freespace on Local Drives
        run("%homedir%winbatch.exe",'"%homedir%wwwmenu95.wil" FREESPACE2')

&System Information
       
       call("%homedir%wwwmenu95.wil","SYSINFO 'WinBatch Popmenu'")

Interactive WIL
        call("%homedir%wwwmenu95.wil","CMDSTACK NEWCMD")

&Blank Screen Now!
       a=IniReadPvt("Boot","SCRNSAVE.EXE","FLYING~1.SCR","SYSTEM.INI")
       ErrorMode(@OFF)
       LastError()
       run(a,"/s")
       ErrorMode(@CANCEL)
       if LastError() then Display(5,"Sorry","No screen blanker found")
ANSI/ASCII Char Charts
      exe=strcat(DirHome(),"winbatch.exe")
      par=strcat('"',DirHome(),"wshelp.dll",'" ',"WBCHARCHART")
      Run(exe,par)
            
_Load Consolidated WIL help file
      ;WinHelp(strcat(wbdir,"Windows Interface Language.hlp"),"CONTENTS","")
      ShellExecute('WILHH.EXE', '"':wbdir:'ConsolidatedWIL.chm"', '', @NORMAL, "")
WinBatch Studio
      ShellExecute("WinBatch Studio.exe", "", "", @NORMAL, "")
WinBatch Navigator
      ShellExecute("winbatch.exe","default.wbt", "", @NORMAL, "")
WinBatch Compiler
      wbc=Strcat(DirHome(),"wbcompiler.exe")
      if FileLocate(wbc)==@FALSE
         Message("Error","WinBatch Compiler not installed")
      else
         ShellExecute(wbc,"", "", @NORMAL, "")
      endif




          
           
           
           
           
           
