Skip to content

Instantly share code, notes, and snippets.

@b4tman
Last active January 21, 2022 07:59
Show Gist options
  • Save b4tman/9400448e925f5758073a88f7ff609202 to your computer and use it in GitHub Desktop.
Save b4tman/9400448e925f5758073a88f7ff609202 to your computer and use it in GitHub Desktop.
@echo off
setlocal EnableExtensions
rem https://1c.ru/rus/support/surrog.htm
echo --- delete services:
FOR %%A IN (haspflt vusbbus VUsb Emulator NEWHASP Multikey) DO (
echo - %%A
sc stop %%A > NUL 2>&1
sc delete %%A > NUL 2>&1
REG DELETE "HKLM\SYSTEM\CurrentControlSet\Services\%%A" /f > NUL 2>&1 )
REG DELETE "HKLM\SYSTEM\CurrentControlSet\NEWHASP" /f > NUL 2>&1
REG DELETE "HKLM\SYSTEM\CurrentControlSet\Multikey" /f > NUL 2>&1
echo.
echo --- delete drivers:
FOR %%A IN (haspflt vusbbus VUsb Multikey) DO (
echo - %%A.sys
del /F /Q "%systemroot%\system32\drivers\%%A.sys" > NUL 2>&1
rem FIXME: (acl restricted for SYSTEM account)
del /F /S /Q %systemroot%\system32\DriverStore\FileRepository\%%A.inf_* > NUL 2>&1
)
echo.
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment