@ECHO OFF
::Set the working directory
set "workingdir=%~dp0"
::Switch to working directory

net stop BstHdAndroidSvc /y 
taskkill /F /IM HD-Agent.exe >nul 2>&1 
taskkill /F /IM HD-BlockDevice.exe >nul 2>&1 
taskkill /F /IM HD-Network.exe >nul 2>&1 
taskkill /F /IM HD-Service.exe >nul 2>&1 
taskkill /F /IM HD-SharedFolder.exe >nul 2>&1 
taskkill /F /IM HD-UpdaterService.exe

echo.
echo Adding Bluestacks services to  startup
reg add HKLM\SYSTEM\CurrentControlSet\Services\BstHdAndroidSvc /v Start /t REG_DWORD /d 4 /f
reg add HKLM\SYSTEM\CurrentControlSet\Services\BstHdLogRotatorSvc /v Start /t REG_DWORD /d 4 /f
reg add HKLM\SYSTEM\CurrentControlSet\Services\BstHdUpdaterSvc /v Start /t REG_DWORD /d 4 /f

choice /c yn /m "Modify BlueStacks resolution to 860x720?"
if %errorlevel% equ 1 CALL regedit.exe /S "%~dp0\conf\860x720.reg"

choice /c yn /m "Modify BlueStacks memory to 2048gb?" 
if %errorlevel% equ 1 CALL regedit.exe /S "%~dp0\conf\memory.reg"

choice /c yn /m "MOdify so send key to enter?"
if %errorlevel% equ 1 copy "%~dp0\conf\com.supercell.clashofclans.cfg" C:\ProgramData\BlueStacks\UserData\InputMapper\com.supercell.clashofclans.cfg

choice /c yn /m "Copy building.csv into shared folder?"
if %errorlevel% equ 1 copy "%~dp0\conf\buildings.csv" C:\ProgramData\BlueStacks\UserData\SharedFolder\

choice /c yn /m "Copy traps.csv into shared folder?"
if %errorlevel% equ 1 copy "%~dp0\conf\traps.csv" C:\ProgramData\BlueStacks\UserData\SharedFolder\

choice /c yn /m "Copy client_globals.csv into shared folder?"
if %errorlevel% equ 1 copy "%~dp0\conf\client_globals.csv" C:\ProgramData\BlueStacks\UserData\SharedFolder\

choice /c yn /m "Copy texts.csv into shared folder?"
if %errorlevel% equ 1 copy "%~dp0\conf\texts.csv" C:\ProgramData\BlueStacks\UserData\SharedFolder\


echo.
echo.
echo If you got this far, everything is complete. Clash On!

Pause

"C:\Program Files\BlueStacks\HD-StartLauncher.exe"