@ECHO Off
PROMPT $P$G

REM -------------------------------------------------------
REM -- DO NOT EDIT THIS FILE! IF YOU WISH TO ADD NETWORK --
REM -- OR CD-ROM DRIVERS, CUSTOM KEYBOARDS, ETC., PLEASE --
REM -- EDIT AUTOEXE2.BAT INSTEAD.                        --
REM -------------------------------------------------------


PQBoot.Exe /rescue


IF EXIST AUTOEXE2.BAT CALL AUTOEXE2.BAT


REM Load Mouse Driver
MOUSE

REM Set BootMagic drive letter var to a bogus value
SET BMDRVLTR=9

REM Search for BootMagic by looking for config program
IF Exist C:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=C
IF Exist D:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=D
IF Exist E:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=E
IF Exist F:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=F
IF Exist G:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=G
IF Exist H:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=H
IF Exist I:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=I
IF Exist J:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=J
IF Exist K:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=K
IF Exist L:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=L
IF Exist M:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=M
IF Exist N:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=N
IF Exist O:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=O
IF Exist P:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=P
IF Exist Q:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=Q
IF Exist R:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=R
IF Exist S:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=S
IF Exist T:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=T
IF Exist U:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=U
IF Exist V:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=V
IF Exist W:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=W
IF Exist X:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=X
IF Exist Y:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=Y
IF Exist Z:\BTMAGIC.PQ\BMCFG.EXE SET BMDRVLTR=Z

REM If we didn't find BootMagic skip loading config
If "%BMDRVLTR%" == "9" goto Skip

REM Load the BootMagic Configuration Manager
%BMDRVLTR%:
CD \BTMagic.PQ
BMCfg.Exe
goto End

:Skip
restrmbr
PQBoot

:End
