anchor.diff:  IF /I "%IWAD%" == "DOOM2.WAD"    GOTO :iwad_doom2
   IF /I "%IWAD%" == "TNT.WAD"      GOTO :iwad_tnt
   IF /I "%IWAD%" == "PLUTONIA.WAD" GOTO :iwad_plutonia
  +IF /I "%IWAD%" == "HERETIC.WAD"  GOTO :iwad_heretic
  +IF /I "%IWAD%" == "HEXEN.WAD"    GOTO :iwad_hexen
   
   REM # not a known iD / commerical IWAD
   GOTO :iwad_missing
  
positive.code: CALL :reg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 2290" "InstallLocation"
  IF NOT "%REG%" == "" (
  	REM # check if TNT.WAD can be found there
  	IF EXIST "%REG%\base\TNT.WAD" SET "IWAD_PATH=%REG%\base\TNT.WAD" & GOTO :iwad_check
  )
  REM # is GOG : Final DOOM installed?
  CALL :reg "HKLM\SOFTWARE\GOG.com\Games\1435848742" "Path"
  IF NOT "%REG%" == "" (
  	REM # check if TNT.WAD can be found there
  	IF EXIST "%REG%\TNT\TNT.WAD" SET "IWAD_PATH=%REG%\TNT\TNT.WAD" & GOTO :iwad_check
  )
  GOTO :iwad_check
  
  
negative.code: CALL :reg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 2290" "InstallLocation"
  IF NOT "%REG%" == "" (
  	REM # check if PLUTONIA.WAD can be found there
  	IF EXIST "%REG%\base\PLUTONIA.WAD" SET "IWAD_PATH=%REG%\base\PLUTONIA.WAD" & GOTO :iwad_found
  )
  REM # is GOG : Final DOOM installed?
  CALL :reg "HKLM\SOFTWARE\GOG.com\Games\1435848742" "Path"
  IF NOT "%REG%" == "" (
  	REM # check if PLUTONIA.WAD can be found there
  	IF EXIST "%REG%\PLUTONIA\PLUTONIA.WAD" SET "IWAD_PATH=%REG%\PLUTONIA\PLUTONIA.WAD" & GOTO :iwad_found
  )
  GOTO :iwad_check
  
  :iwad_heretic
  REM --------------------------------------------------------------------------------------------------------------------
  REM # is Steam : Heretic installed?
  CALL :reg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 2390" "InstallLocation"
  IF NOT "%REG%" == "" (
  	REM # check if HERETIC.WAD can be found there
  	IF EXIST "%REG%\base\HERETIC.WAD" SET "IWAD_PATH=%REG%\base\HERETIC.WAD" & GOTO :iwad_found
  )
  GOTO :iwad_check
  
  :iwad_hexen
  REM --------------------------------------------------------------------------------------------------------------------
  REM # is Steam : Hexen installed?
  CALL :reg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 2360" "InstallLocation"
  IF NOT "%REG%" == "" (
  	REM # check if HERETIC.WAD can be found there
  	IF EXIST "%REG%\base\HEXEN.WAD" SET "IWAD_PATH=%REG%\base\HEXEN.WAD" & GOTO :iwad_found
  )
  
  :iwad_check
  REM # did we find the IWAD in GOG / Steam?
  REM # TODO: if IWAD was found in GOG / Steam, offer to copy it into PortaDOOM
  IF EXIST "%IWAD_PATH%" GOTO :iwad_found
  
  
  :iwad_missing
  REM --------------------------------------------------------------------------------------------------------------------
  