@echo off
chcp 1251
title Remove Client DE Black Spider Starter Kit
set DEBSCU_CODE=%1
set DEBS_PATH=%2

utils\reg delete "HKLM\Software\Digital Empire\BlackSpider Client\%DEBSCU_CODE%" /FORCE

rem Remove Client DE Black Spider Starter Kit

net stop "DE BlackSpider delivery agent"
net stop "DE BlackSpider load agent"

tskill loadf
tskill dlvrf
rem tskill bsstatus

agents\instsrv "DE BlackSpider delivery agent" REMOVE
agents\instsrv "DE BlackSpider load agent" REMOVE

utils\reg DELETE "HKLM\SYSTEM\CurrentControlSet\Services\DE BlackSpider delivery agent" /FORCE
utils\reg DELETE "HKLM\SYSTEM\CurrentControlSet\Services\DE BlackSpider load agent" /FORCE

RD /s /Q %DEBS_PATH%

cscript //nologo dltlinks.vbs > nul

pause