          RegOpenFlags(1) ; Tell WB to look at 32 bit registry on 64 bit systems
			 homedir64="" 
          ErrorMode(@OFF)
          wbdir=RegQueryStr(@REGMACHINE,"SOFTWARE\Wilson WindowWare\WinBatch\CurrentVersion")
          if wbdir==0 
             wbdir=RegQueryStr(@REGMACHINE,"SOFTWARE\Wilson WindowWare\WinBatch Compiler\CurrentVersion")
          endif
			 homedir64=RegQueryValue(@REGMACHINE, "SOFTWARE\Wilson WindowWare\WinBatch\CurrentSystem64")
			 ErrorMode(@CANCEL)
          RegOpenFlags(0) ; Tell WB to resume default registry operations
			 if homedir64==0 then homdir64=""
          if wbdir==0
             Display(5,"Error","Registry entries missing.  Re-install WinBatch")
             exit
          endif
          homedir=strcat(wbdir,"system\")
			
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( 'filemenu.exe',  '/separate,/e,C:\',  DirGet(), @Normal ,   '' )
					while FindWindow( winclass ) == ""    ;wait for it to come up
					TimeDelay( 0.1 )
					endwhile
					;Fall into case 1
				case 1
					TimeDelay( 0.3 )
					ShellExecute( 'filemenu.exe',  '/separate,/e,C:\',  DirGet(), @Normal ,   '' )
					break
				case c       ; 2 or more
					break
			endswitch
			TimeDelay( 0.5 )
			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)
			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
_WinBatch Navigator 64-bit
      wb64=Strcat(homedir64,"winbatch.exe")
		if homedir64!="" && FileExist(wb64)
      	ShellExecute(wb64,"default.wbt", "", @NORMAL, "")
		elseif WinMetrics(-7)==2
         Message("PopMenu Error","WinBatch 64-bit not installed")
		else
         Message("PopMenu Error","WinBatch 64-bit only available on 64-bit systems")			
		endif
WinBatch Compiler 64-bit
      wbc64=Strcat(homedir64,"wbcompiler.exe")
		if homedir64!="" && FileExist(wbc64)
      	ShellExecute(wbc64,"", "", @NORMAL, "")
		elseif WinMetrics(-7)==2
         Message("PopMenu Error","WinBatch Compiler 64-bit not installed")
		else
         Message("PopMenu Error","WinBatch Compiler 64-bit only available on 64-bit systems")			
		endif





          
           
           
           
           
           
