< Anri-chan | Source
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
@ECHO OFF
SET basedir=C:\Program Files\anrichan3
IF EXIST install.txt DEL install.txt
IF EXIST uninstall.txt DEL uninstall.txt
SETLOCAL ENABLEDELAYEDEXPANSION
FOR /F "delims=" %%G IN ('DIR /B /A-D "%basedir%"') DO (
ECHO File "%basedir%\%%G" >> install.txt
)
FOR /F "delims=" %%G IN ('DIR /B /AD /S "%basedir%"') DO (
SET str=%%G
SET relativepath=!str:%basedir%\=!
ECHO SetOutPath "$INSTDIR\!relativepath!" >> install.txt
FOR /F "delims=" %%H IN ('DIR /B /A-D "!str!"') DO (
ECHO File "!str!\%%H" >> install.txt
)
)
FOR /F "delims=" %%G IN ('dir /B /A-D /S "%basedir%"') DO (
SET str=%%G
ECHO Delete "$INSTDIR\!str:~27!" >> uninstall.txt
)
ENDLOCAL ENABLEDELAYEDEXPANSION
EXIT