@echo off
cls
echo  ************************* DR.HARDWARE SYSINFO **************************
echo  ÿ                                                                        
echo                        Installation onto Hard disk                       
echo   ÿ                                                                       
echo  ÿ                                                                        
echo    Please press any key if you want to install DR. HARDWARE         
if "%1" == ""  goto INSTFIRSTHD
if "%1" == "c:" goto INST
if "%1" == "d:" goto INST
if "%1" == "e:" goto INST
if "%1" == "f:" goto INST
if "%1" == "g:" goto INST
if "%1" == "h:" goto INST
if "%1" == "i:" goto INST
if "%1" == "j:" goto INST
if "%1" == "k:" goto INST
if "%1" == "l:" goto INST
if "%1" == "m:" goto INST
if "%1" == "n:" goto INST
if "%1" == "o:" goto INST
if "%1" == "p:" goto INST
if "%1" == "q:" goto INST
if "%1" == "r:" goto INST
if "%1" == "s:" goto INST
if "%1" == "t:" goto INST
if "%1" == "u:" goto INST
if "%1" == "v:" goto INST
if "%1" == "w:" goto INST
if "%1" == "x:" goto INST
if "%1" == "y:" goto INST
if "%1" == "z:" goto INST
goto INSTFIRSTHD

:INSTFIRSTHD
echo    into the directory \DRHARD on drive C:\.    
echo    ÿ                                                                      ÿ
echo      Note:                                                              
echo      Additional command line parameters allow you to determine the        
echo      target drive and directory by your own.             
echo      Syntax :   INSTALL X: Directory name                                  
echo      Examples:  
echo      [INSTALL D: TEST] Installs the program in directory "TEST" on D:\   
echo      [INSTALL E:]      Installs the program in the default directory
echo                        \DRHARD on drive E:\  
goto LETSGO

:INST
if "%2" == "" goto NODIR
echo    into directory \%2 on drive %1.         
goto LETSGO

:NODIR
echo    into directory \DRHARD on drive %1.     
goto LETSGO

:LETSGO
echo    ÿ                                                                      
echo    Press CTRL+C to quit installation now.  
echo    ÿ                                                                      
echo  ************************************************************************
PAUSE >NUL
cls
if "%1" == "" goto INSTTOC
if "%2" == "" goto INSTSTDDIR
md %1\%2
if not exist %1\%2\drhard.exe goto LETSCOPY
cls
echo !!Warning!! 
echo The target directory contains a file named DRHARD.EXE.
echo Note that elder program files would be overwritten now.
echo To abort installation now press CTRL+C.
pause >nul
goto LETSCOPY

:LETSCOPY
rem if errorlevel 4 goto ERRMESSAGE
rem if errorlevel 1 goto ERRMESSAGE
echo Copying...
copy *.*  %1\%2		>nul
goto ENDMESSAGE

:INSTSTDDIR
md %1\DRHARD 			>nul
if not exist %1\drhard\drhard.exe goto CPYSTDDIR
cls
echo !!Warning!!
echo The target directory contains a file named DRHARD.EXE.
echo Note that elder program files would be overwritten now.
echo To abort installation now press CTRL+C.
echo Abbruch mit STRG+C bzw. CTRL+C.
pause >nul
goto CPYSTDDIR

:CPYSTDDIR
rem if errorlevel 4 goto ERRMESSAGE
rem if errorlevel 1 goto ERRMESSAGE
echo Copying...
copy *.*  %1\DRHARD	>nul
goto ENDMESSAGE

:INSTTOC
md c:\drhard
if not exist c:\drhard\drhard.exe goto CPYTOC
cls
echo !!Warning!!
echo The target directory contains a file named DRHARD.EXE.
echo Note that elder program files would be overwritten now.
echo To abort installation now press CTRL+C.
pause >nul
goto CPYTOC

:CPYTOC
echo Copying ...
copy *.* c:\drhard >nul
goto ENDMESSAGE

:ERRMESSAGE
cls
echo  **************************************
echo    Input error - define drive again!!!
echo    Any key...
echo  **************************************
goto END

:ENDMESSAGE
echo ÿ
echo  ********************************************************
echo     Installation completed!
echo  ÿ
echo     Start the program by switching to the program directory
if "%1"=="" goto STARTSTD
if "%2"=="" goto STARTDRV
goto STARTDIRDRV

:STARTSTD
echo     C:\. Enter: [cd drhard]
goto STARTEXE

:STARTDRV
echo     %1\. Enter: [cd drhard]
goto STARTEXE

:STARTDIRDRV
echo     %1\. Enter: [cd %2]
goto STARTEXE

:STARTEXE
echo     ...and then load the EXE file...
echo     Enter: [drhard]
echo     ÿ
echo     Press any key...
echo  ********************************************************
goto END

:END
pause >nul
echo on