@ECHO OFF
SET APPNAME=Google Web Designer
Title %APPNAME% 卸载清理 & Color 2F
CD "%SystemRoot%\system32"
CALL :CHECKADMIN
CD /D "%~dp0"
ECHO.
ECHO 正在卸载的软件是「%APPNAME%」
ECHO.
ECHO 脚本作者: 黯然过客
ECHO 发布地址: https://www.portablesoft.org/google-web-designer/
ECHO.
ECHO * 终止脚本运行请按下 Alt+F4 或点击右上角叉号/关闭按钮 *
ECHO.
PAUSE
ECHO.
RD /S /Q "%LOCALAPPDATA%\Google\Google Web Designer"
RD /Q "%LOCALAPPDATA%\Google"
REG DELETE "HKLM\SOFTWARE\Microsoft\RADAR\HeapLeakDetection\DiagnosedApplications\webdesigner.exe" /F
REG DELETE "HKCU\Software\Google\Web Designer" /F
REG DELETE "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store" /V "%~dp0webdesigner.exe" /F
REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FeatureUsage\AppSwitched" /V "%~dp0webdesigner.exe" /F
:: End Uninstall
CLS
ECHO.
ECHO 彻底清理完毕 by 黯然过客@www.PortableSoft.org
ECHO.
PAUSE
EXIT
:CHECKADMIN
REG QUERY "HKU\S-1-5-19\Environment"
IF NOT %ERRORLEVEL% EQU 0 (
	CLS
	ECHO.
	ECHO 需要管理员权限才能执行 ...
	ECHO.
	ECHO 请右键单击本脚本文件选择「以管理员身份运行」
	ECHO.
	PAUSE & EXIT
)
CLS
GOTO:EOF