@ECHO OFF& TITLE 卸载
taskkill /f /im Xshell* >NUL 2>NUL

rd/s/q "%ProgramData%\NetSarang" 2>NUL
rd/s/q "%AllUsersProfile%\NetSarang"2>NUL
reg delete HKCU\Software\NetSarang /F>NUL 2>NUL
reg delete HKLM\SOFTWARE\NetSarang /F>NUL 2>NUL
reg delete HKLM\SOFTWARE\Wow6432Node\NetSarang /F>NUL 2>NUL
del /q "%userprofile%\桌面\Xshell 6.lnk" >NUL  2>NUL 
del /q "%userprofile%\Desktop\Xshell 6.lnk" >NUL  2>NUL 

ECHO.&ECHO 卸载完成！删除用户数据？
ECHO.&ECHO 是按任意键，否直接关闭！&PAUSE >NUL 2>NUL & CLS

for /f "skip=2 tokens=3 delims= " %%i in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v personal') do (
       for /f "delims=*" %%j in ('echo %%i') do rd/s/q "%%j\NetSarang" 2>NUL)

If Exist "Xshell"  rd/s/q "Xshell" 2>NUL
If Exist "Common"  rd/s/q "Common" 2>NUL

ECHO.&ECHO 卸载完成！按任意键退出！&PAUSE >NUL 2>NUL & EXIT