Dim WshShell, BtnCode, cFolder, cMessage, cCommand, cTitle, cManager, cKey  
Set WshShell = WScript.CreateObject("WScript.Shell")

cTitle = "Удаление КУ DE-BS"
Do
cManager = InputBox("Укажите 4-буквенный код ПЛ, КУ которого необходимо удалить.", cTitle, cManager)
Loop until  cManager <> "" or IsEmpty(cManager) = True
If IsEmpty(cManager) = False Then 
	cKey = "HKLM\Software\Digital Empire\BlackSpider Client\" & cManager    
	cFolder = WshShell.RegRead(cKey)
	cMessage = "Удалить КУ DE-BS и все его компоненты из каталога " & cFolder & " ?"
	BtnCode = WshShell.Popup(cMessage, 0, cTitle, 4 + 32)
	cCommand = "remove.bat " & Trim(cManager) & " " & Trim(cFolder)
	Select Case BtnCode
	   case 6      
		   Set WshShell = CreateObject("WScript.Shell")
		   WshShell.Run(cCommand)
	End Select
End if


