@echo off
::PLEASE DO NOT EDIT ANYTHING
title PDM Easy Setup for Diablo II: LoD v1.13c
color 70
::=======================================;
::|-.,_,.-.,_,.-.,_,.-.,_,.-.,_,.-.,_,.-|;
::|\(`'*-.,_ PDM by Sheer_Cold _,.-*'`)/|;
::|\(`'*-.,_ at Ladderhall.com _,.-*'`)/|;
::|\(`'*-.,_*******************_,.-*'`)/|;
::|-.,_,.-.,_,.-.,_,.-.,_,.-.,_,.-.,_,.-|;
::=======================================;
echo PDM Installer 1.1.2
echo.
echo.
:setup
set /P M=Type: U to uninstall or I to install or Q to quit and press ENTER: 
if "%M%" == "U" goto :uninst1
if "%M%" == "u" goto :uninst1
if "%M%" == "I" goto :inst1
if "%M%" == "i" goto :inst1
if "%M%" == "q" exit
if "%M%" == "Q" exit
::else
echo Invalid command.
goto :setup
:inst1
if not exist mod.file goto :prob
if exist Patch_D2.bak goto :prob
if not exist Patch_D2.mpq goto :prob
if exist mod.file goto :inst2
:inst2
if not exist Patch_D2.bak goto :inst3
:inst3
ren Patch_D2.mpq Patch_D2.bak
ren mod.file Patch_D2.mpq
goto :success
exit
:uninst1
if not exist Patch_D2.mpq goto :prob
if not exist Patch_D2.bak goto :prob
if exist mod.file goto :prob
if not exist mod.file goto :uninst2
:uninst2
if exist Patch_D2.bak goto :uninst3
:uninst3
ren Patch_D2.mpq mod.file
ren Patch_D2.bak Patch_D2.mpq
goto :success2
:prob
echo Something went wrong with the installation, would you like to try again?
echo.
set /P M=Continue with installation? Y / N: 
if "%M%" == "Y" goto :setup
if "%M%" == "y" goto :setup
if "%M%" == "N" exit
if "%M%" == "n" exit
::else
echo.
echo Invalid command.
echo.
goto :prob
:success
echo Installation successful
timeout /nobreak 5
::kill when s == 5
exit
:success2
echo Uninstall successful
timeout /nobreak 5
::kill when s == 5
exit