@ECHO OFF & PUSHD "%~DP0" && CD /D "%~DP0"
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
if exist "%WinDir%\System32\drivers\sysdiag.sys" goto Athrow
if exist "%WinDir%\system32\drivers\hrfwdrv.sys" goto Athrow
net stop "sysdiag" >NUL
net stop "hrfwdrv" >NUL
sc delete "hrfwdrv" >NUL
sc delete "sysdiag" >NUL
reg delete "HKLM\SYSTEM\CurrentControlSet\Services\hrwfpdr" /f >NUL
reg delete "HKLM\SYSTEM\CurrentControlSet\Services\sysdiag" /f >NUL
del/f/q "%userprofile%\desktop\HRSword.lnk" >NUL
echo HRSword卸载成功
pause
exit
:Athrow
msg * "请先使用HRSword取消sysdiag和hrfwdrv驱动自启动，重启后手动删除内核驱动%WinDir%\System32\drivers\sysdiag hrfwdrv并重启电脑后再运行此脚本"
exit