@ECHO OFF&(PUSHD "%~DP0")&(REG QUERY "HKU\S-1-5-19">NUL 2>&1)||(
powershell -Command "Start-Process '%~sdpnx0' -Verb RunAs"&&EXIT)

taskkill /f /im makensis* >NUL 2>NUL
taskkill /f /im VNISEdit.exe >NUL 2>NUL

ver|findstr "5\.[0-9]\.[0-9][0-9]*" >NUL && (
del/q "%UserProfile%\桌面\NSIS.lnk" >NUL 2>NUL
del/q "%AllUsersProfile%\桌面\NSIS.lnk" >NUL 2>NUL
rd/s/q "%UserProfile%\「开始」菜单\程序\NSIS"2>NUL
rd/s/q "%AllUsersProfile%\「开始」菜单\程序\NSIS"2>NUL
)
ver|findstr "\<6\.[0-9]\.[0-9][0-9]*\> \<10\.[0-9]\.[0-9][0-9]*\>" >NUL && (
del/q "%Public%\Desktop\NSIS.lnk" >NUL 2>NUL
del/q "%UserProfile%\Desktop\NSIS.lnk" >NUL 2>NUL
rd/s/q "%AppData%\Microsoft\Windows\Start Menu\Programs\NSIS"2>NUL
rd/s/q "%ProgramData%\Microsoft\Windows\Start Menu\Programs\NSIS"2>NUL
)

reg delete "HKLM\SOFTWARE\NSIS" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\WOW6432Node\NSIS" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\.nsh" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\.nsi" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\NSIS.Header" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\NSIS.LangFile" /f >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\NSIS.Script" /f >NUL 2>NUL

assoc .=.file >NUL 2>NUL

Exit
