@echo off
SETLOCAL EnableExtensions EnableDelayedExpansion

Set WD=%~1

echo.
echo   RSVCPACK

echo      ᯨ᮪ ⠭ 
for /f "useback delims=" %%i in (`"dir "%I386%\SVCPACK" /B|findstr /I ".exe .cmd""`) do >>"%WD%\ADDONS.LST" echo %%~ni

echo     㥬 䠩 ஥ RunSetup.ini  :
set file=Files\ForceCopy\SVCPACK\RunSetup.ini
if exist "%WD%\%file%" del /q "%WD%\%file%"
echo ;----------------------------------------------------------------------------------------------->>"%WD%\%file%"
echo ;    (    -     )>>"%WD%\%file%"
echo ;----------------------------------------------------------------------------------------------->>"%WD%\%file%"
echo ;>>"%WD%\%file%"
echo ;      SVCPACK (  = )>>"%WD%\%file%"
echo ;----------------------------------------------------------------------------------------------->>"%WD%\%file%"
echo [Hint]>>"%WD%\%file%"
for /f "delims=" %%i in ('"findstr /I /G:"%WD%\ADDONS.lst" "%WD%\AddonBASE.xls""') do (
  set str=%%i
  >>"%WD%\%file%" echo !str:	=!
)
del /q "%WD%\ADDONS.lst"
findstr . "%WD%\Params.ini">>"%WD%\%file%"
move /y "%WD%\%file%" "%I386%\SVCPACK\RunSetup.ini">nul

echo.