@echo off

echo CoD WW - Mod / Map Remover by Opferlamm-Clan (www.opferlamm-clan.de)
echo.
echo Dieses Tool lscht ALLE Custominhalte von Call of Duty World at War.
echo Es werden nur Mods und Usermaps entfernt.
echo.
echo Erspielte Rnge werden NICHT entfernt!
echo.
echo.
echo Wollen sie wirklich alle Custominhalte entfernen?
echo.
echo (Besttigen mit markierter Taste)
echo.
set /P w= [J]a / [N]ein : 
echo.

REM Die Option /I beim if bewirkt, dass nicht
REM zwischen Gross und Kleinschreibung
REM unterschieden wird.

if /I "%w%"=="J" goto :ERKENNUNG
if /I "%w%"=="N" goto :ABBRUCH

REM Erkennt falsche Tastenauswahl
echo Fehler! Falsche Taste gewhlt: [%w%]
echo.

goto :ABBRUCHENDE

:ERKENNUNG

REM Hier wird das Betriebssystem erkannt und zum entsprechenden Block weitergeleitet
ver | find "5.0" && goto :W2K
ver | find "5.1" && goto :XP
ver | find "6.0" && goto :VISTA

REM Wenn das Betriebssystem nicht supported wird --> Auftrag abbrechen
goto :NOSUPPORT

:W2K

echo.
echo Custominhalte werden gelscht...
echo.

REM Abfrage, ob Pfad existiert (deutsche Sprachversion)
if exist "%USERPROFILE%\Lokale Einstellungen\Anwendungsdaten\Activision\CoDWaW\mods\" rd /q /s "%USERPROFILE%\Lokale Einstellungen\Anwendungsdaten\Activision\CoDWaW\mods\"
if exist "%USERPROFILE%\Lokale Einstellungen\Anwendungsdaten\Activision\CoDWaW\usermaps\" rd /q /s "%USERPROFILE%\Lokale Einstellungen\Anwendungsdaten\Activision\CoDWaW\usermaps\"

REM Abfrage, ob Pfad existiert (englische Sprachversion)
if exist "%USERPROFILE%\Local Settings\Application Data\Activision\CoDWaW\mods\" rd /q /s "%USERPROFILE%\Local Settings\Application Data\Activision\CoDWaW\mods\"
if exist "%USERPROFILE%\Local Settings\Application Data\Activision\CoDWaW\usermaps\" rd /q /s "%USERPROFILE%\Local Settings\Application Data\Activision\CoDWaW\usermaps\"

goto :ENDE

:XP

echo.
echo Custominhalte werden gelscht...
echo.

REM Abfrage, ob Pfad existiert (deutsche Sprachversion)
if exist "%USERPROFILE%\Lokale Einstellungen\Anwendungsdaten\Activision\CoDWaW\mods\" rd /q /s "%USERPROFILE%\Lokale Einstellungen\Anwendungsdaten\Activision\CoDWaW\mods\"
if exist "%USERPROFILE%\Lokale Einstellungen\Anwendungsdaten\Activision\CoDWaW\usermaps\" rd /q /s "%USERPROFILE%\Lokale Einstellungen\Anwendungsdaten\Activision\CoDWaW\usermaps\"

REM Abfrage, ob Pfad existiert (englische Sprachversion)
if exist "%USERPROFILE%\Local Settings\Application Data\Activision\CoDWaW\mods\" rd /q /s "%USERPROFILE%\Local Settings\Application Data\Activision\CoDWaW\mods\"
if exist "%USERPROFILE%\Local Settings\Application Data\Activision\CoDWaW\usermaps\" rd /q /s "%USERPROFILE%\Local Settings\Application Data\Activision\CoDWaW\usermaps\"

goto :ENDE

:VISTA

echo.
echo Custominhalte werden gelscht...
echo.

REM Direkte Pfadangabe, ohne if exist, da alle Sprachversionen den gleichen Pfad nutzen
rd /q /s "%LOCALAPPDATA%\Activision\CoDWaW\mods\"
rd /q /s "%LOCALAPPDATA%\Activision\CoDWaW\usermaps\"

goto :ENDE

:NOSUPPORT

echo Auftrag abgebrochen.
echo.
echo Dieses Betriebssystem wird nicht untersttzt!
echo.
echo.
echo.

pause
exit

:ABBRUCH

echo Auftrag abgebrochen.
echo.
echo.
echo.

pause
exit

:ENDE

echo Auftrag erledigt.
echo.
echo Alle Custominhalte wurden gelscht.
echo.
echo.
echo.

pause
exit

:ABBRUCHENDE

echo Auftrag abgebrochen.
echo.
echo.
echo.

pause
exit
