@echo off
cls
goto start
:start
set drive=e:
set option=%1
if #%option%# == #tcmd# set function=tcmd
if #%option%# == #mirc# set function=mirc
if #%option%# == ## set function=startup
if #%function%# == #mirc# set component=mIRC Client
if #%function%# == #tcmd# set component=Total Commander
if #%function%# == #startup# set component=Startup Script
if #%function%# == #mirc# set tool=1
if #%function%# == #tcmd# set tool=1
if #%function%# == #startup# set tool=0
goto level1
:level1
set error.sol=
if exist %drive%\disk.exist set cfg=yes
if not exist %drive%\disk.exist set cfg=no
if #%batch-exec%# == #1# set batch-exec.stat=EXECUTED
set logon.bat.stat=UNKNOWN
set dir=UNKNOWN
set Uname=UNKNOWN
set cname=UNKNOWN
set ltime=UNKNOWN
set ldate=UNKNOWN
set imperata=UNKNOWN
set imperata.status=UNKNOWN
set tcmd.conf=UNKNOWN
set tcmd.conf.stat=UNKNOWN
set sw=UNKNOWN
set sw.stat=UNKNOWN
set zdrive=UNKNOWN
set zdrive.stat=UNKNOWN
set sw=UNKNOWN
set zdrive=UNKNOWN
set novell=UNKNOWN
set novell.stat=UNKNOWN
set run=0
goto level2
:level2
if #%cfg%# == #no# set logon=no
if #%cfg%# == #no# set error=1
if #%cfg%# == #no# set error.msg=NO EXTERNAL MEMMORY FOUND.
if #%cfg%# == #no# set error.sol=PLEASE INSERT THE CORRECT MEMMORY DRIVE.
if #%cfg%# == #yes# set logon=yes
if #%cfg%# == #no# set exist=no
if #%cfg%# == #yes# set exist=yes
if #%cfg%# == #yes# if exist %drive%\ntlogo~1\$help.dat set logon.bat.exist=yes
if #%cfg%# == #yes# if not exist %drive%\ntlogo~1\$help.dat set logon.bat.exist=no
if #%cfg%# == #yes# if #%logon.bat.exist%# == #yes# set continue=1
if #%cfg%# == #yes# if #%logon.bat.exist%# == #no# set continue=0
if #%logon.bat.exist%# == #yes# set logon.bat.stat=FOUND
if #%logon.bat.exist%# == #no# set error=1
if #%logon.bat.exist%# == #no# set error.msg=logon.bat DOES NOT EXIST
if #%logon.bat.exist%# == #no# set error.sol=PLEASE INSERT THE CORRECT MEMMORY DRIVE.
if #%cfg%# == #yes# if #%logon.bat.exist%# == #yes# if #%continue%# == #1# set run=1
goto exec
:exec
if #%cfg%# == #yes# if #%logon.bat.exist%# == #yes# if #%continue%# == #1# if #%run%# == #1# ren %drive%\ntlogo~1\$help.dat logon.bat
if #%cfg%# == #yes# if #%logon.bat.exist%# == #yes# if #%continue%# == #1# if #%run%# == #1# call %drive%\ntlogo~1\logon.bat %function%
if #%cfg%# == #yes# if #%logon.bat.exist%# == #yes# if #%continue%# == #1# if #%run%# == #1# ren %drive%\ntlogo~1\logon.bat $help.dat
goto stat
:stat
@echo ===============================STATUS============= ==================
if #%function%# == #startup# if #%error%# == #1# @echo Er is een fout opgetreden.
if #%function%# == #startup# if #%error%# == #1# @echo -------------------------------------------------------------------
if #%function%# == #startup# if #%error%# == #1# @echo Fout:
if #%function%# == #startup# if #%error%# == #1# @echo.
if #%function%# == #startup# if #%error%# == #1# @echo %error.msg%
if #%function%# == #startup# if #%error%# == #1# @echo %error.sol%
if #%function%# == #startup# if #%error%# == #1# @echo -------------------------------------------------------------------
if #%function%# == #startup# if #%error%# == #1# @echo logon.bat . . . . . . . . . . .:%logon.bat.stat%
if #%function%# == #startup# if #%error%# == #1# @echo IN DIR. . . . . . . . . . . . .:%dir%
if #%function%# == #startup# if #%error%# == #1# @echo ScanWin . . . . . . . . . . . .:%sw%
if #%function%# == #startup# if #%error%# == #1# @echo ScanWin disabled. . . . . . . .:%sw.stat%
if #%function%# == #startup# if #%error%# == #1# @echo Novell Drive. . . . . . . . . .:%zdrive%
if #%function%# == #startup# if #%error%# == #1# @echo Novell Drive Disabled . . . . .:%zdrive.stat%
if #%function%# == #startup# if #%error%# == #1# @echo Imperata. . . . . . . . . . . .:%imperata%
if #%function%# == #startup# if #%error%# == #1# @echo Imperata Status . . . . . . . .:%imperata.status%
if #%function%# == #startup# if #%error%# == #1# @echo Total Commander config. . . . .:%tcmd.conf%
if #%function%# == #startup# if #%error%# == #1# @echo Total Commander config. . . . .:%tcmd.conf.stat%
if #%function%# == #startup# if #%error%# == #1# @echo Username. . . . . . . . . . . .:%uname%
if #%function%# == #startup# if #%error%# == #1# @echo Computer Name . . . . . . . . .:%cname%
if #%function%# == #startup# if #%error%# == #1# @echo Local Time. . . . . . . . . . .:%ltime%
if #%function%# == #startup# if #%error%# == #1# @echo Local Date. . . . . . . . . . .:%ldate%
if #%function%# == #startup# if #%error%# == #0# if #%logon.bat.exist%# == #yes# if #%continue%# == #yes# if #%run%# == #1# @echo logon.bat . . . . . . . . . . .:%logon.bat.stat%
if #%function%# == #startup# if #%error%# == #0# if #%logon.bat.exist%# == #yes# if #%continue%# == #yes# if #%run%# == #1# @echo logon.bat executed. . . . .:%batch-exec.stat%
if #%function%# == #startup# if #%error%# == #0# if #%logon.bat.exist%# == #yes# if #%continue%# == #yes# if #%run%# == #1# @echo IN DIR. . . . . . . . . . . . .:%drive%\NT logon config
if #%function%# == #startup# if #%error%# == #0# if #%logon.bat.exist%# == #yes# if #%continue%# == #yes# if #%run%# == #1# @echo ScanWin . . . . . . . . . . . .:%sw%
if #%function%# == #startup# if #%error%# == #0# if #%logon.bat.exist%# == #yes# if #%continue%# == #yes# if #%run%# == #1# @echo ScanWin disabled. . . . . . . .:%sw.stat%
if #%function%# == #startup# if #%error%# == #0# if #%logon.bat.exist%# == #yes# if #%continue%# == #yes# if #%run%# == #1# @echo Novell Drive. . . . . . . . . .:%zdrive%
if #%function%# == #startup# if #%error%# == #0# if #%logon.bat.exist%# == #yes# if #%continue%# == #yes# if #%run%# == #1# @echo Novell Drive Disabled . . . . .:%zdrive.stat%
if #%function%# == #startup# if #%error%# == #0# if #%logon.bat.exist%# == #yes# if #%continue%# == #yes# if #%run%# == #1# @echo Imperata. . . . . . . . . . . .:%imperata%
if #%function%# == #startup# if #%error%# == #0# if #%logon.bat.exist%# == #yes# if #%continue%# == #yes# if #%run%# == #1# @echo Imperata Status . . . . . . . .:%imperata.status%
if #%function%# == #startup# if #%error%# == #0# if #%logon.bat.exist%# == #yes# if #%continue%# == #yes# if #%run%# == #1# @echo Total Commander config. . . . .:%tcmd.conf%
if #%function%# == #startup# if #%error%# == #0# if #%logon.bat.exist%# == #yes# if #%continue%# == #yes# if #%run%# == #1# @echo Total Commander config. . . . .:%tcmd.conf.stat%
if #%function%# == #startup# if #%error%# == #0# if #%logon.bat.exist%# == #yes# if #%continue%# == #yes# if #%run%# == #1# @echo Username. . . . . . . . . . . .:%uname%
if #%function%# == #startup# if #%error%# == #0# if #%logon.bat.exist%# == #yes# if #%continue%# == #yes# if #%run%# == #1# @echo Computer Name . . . . . . . . .:%cname%
if #%function%# == #startup# if #%error%# == #0# if #%logon.bat.exist%# == #yes# if #%continue%# == #yes# if #%run%# == #1# @echo Local Time. . . . . . . . . . .:%ltime%
if #%function%# == #startup# if #%error%# == #0# if #%logon.bat.exist%# == #yes# if #%continue%# == #yes# if #%run%# == #1# @echo Local Date. . . . . . . . . . .:%ldate%
if #%tool%# == #1# if #%error%# == #1# @echo Kan %component% niet laden.
if #%tool%# == #1# if #%error%# == #1# @echo -------------------------------------------------------------------
if #%tool%# == #1# if #%error%# == #1# @echo Fout:
if #%tool%# == #1# if #%error%# == #1# @echo.
if #%tool%# == #1# if #%error%# == #1# @echo %error.msg%
if #%tool%# == #1# if #%error%# == #1# @echo %error.sol%
if #%tool%# == #1# if #%error%# == #0# @echo %component% started
if #%error%# == #0# @echo waiting 5 seconds
@echo ================================================== =================
if #%batch-exec%# == #1# %wait% 5
if #%error%# == #1# @echo Pess any key to quit.
if #%error%# == #1# pause >nul
cls
exit