@echo.
@echo. Installation of KLINGON.WAD
@echo.
@echo. This will take some seconds, be patient.
@echo.
@rem Check main WAD
@if not exist doom.wad goto miss
@echo @echo. Restoration > restore.bat
@echo doom.exe -file klingon.wad > play.bat 
@rem
@rem Install Sprites or Flats in WAD
@if not exist klingon.wad goto miss
@echo deusf -res klingon.wad >> restore.bat
@echo  Completing sprites and flats, please wait...
@deusf -main .\doom.wad -as klingon.wad> deusf.log
@if not ERRORLEVEL 0 goto fail 
@rem
@rem
@echo Installation succeeded.
@echo type PLAY to play the modified game.
@echo type RESTORE to uninstall.
@goto end
:fail
@echo. Installation failed: A tool didn't work.
@echo. See hack.log or deusf.log for details.
@goto end
:miss
@echo. Installation impossible: some files are missing.
@echo. Did you have deusf.exe and dehacked.exe ?
@echo. Please copy all your files in the main game directory.
@echo. And try install again.
@goto end
:end
