@echo off
if "%1"=="" (
  Echo CreateObject^("Shell.Application"^).ShellExecute WScript.Arguments^(0^),"test","","runas",1 >"%~dp0elev.vbs"
  cscript.exe //nologo "%~dp0elev.vbs" "%~dpnx0"& Goto :eof
)
>nul del "%~dp0elev.vbs"
chdir /d "%~dp0"

echo Uninstallation...

REG DELETE "HKLM\SOFTWARE\Aktiv Co.\Rutoken\rtPKCS11-Spy" /f > Nul

del /F /Q C:\Windows\system32\rtPKCS11ECP.dll
rename %SystemRoot%\system32\rtPKCS11ECP_orig.dll rtPKCS11ECP.dll

echo Uninstallation completed successfully.

Pause