⑴echo off
⑵(PUSHD "%~DP")&(REG QUERY "HKUS---">NUL >&)||(powershell -mand "Start-Process '%~fdpnx' -Verb RunAs"&&EXIT)
⑶title 在Win下给图片右键添加"用画图编辑"
⑷for /f "tokens= delims= " %%a in ('ver') do (for /f "tokens= delims=." %%b in ("%%a") do set num=%%b)
⑸if %num% LSS echo 你的系统无需此操作 按任意键退出&pause>NUL&exit
⑹reg query "HKCRLocal SettingsSoftwareMicrosoftWindowsCurrentVersionAppModelPackageRepositoryExtensionsProgIDsAppXcesbfsvmjbtsdkrsvmrhxbkj">nul >nul
⑺if %errorlevel% == echo 未安装画图 按任意键退出&pause>NUL&exit
⑻set /a menu=
⑼echo 在Win下给图片右键添加"用画图编辑"&echo=&echo 、添加或修复右键菜单 (由于微软频繁的自动更新程序 所以需要经常修复)&echo=&echo 、删除右键菜单&echo=
⑽set /p menu=请选择功能 (默认 %menu% 不做更改 直接退出):
⑾if %menu%== exit
⑿if %menu%== goto
⒀if %menu%== goto
⒁echo 正在添加或修复右键菜单 请稍候...
⒂for /f "tokens=* delims= " %%a in ('reg query "HKCRLocal SettingsSoftwareMicrosoftWindowsCurrentVersionAppModelPackageRepositoryExtensionsProgIDsAppXcesbfsvmjbtsdkrsvmrhxbkj"') do set mspaint=%ProgramFiles%WindowsApps%%aPaintAppmspaint.exe
⒃set all=avci,avif,bmp,dib,emf,gif,heic,heif,hif,ico,jfif,jpe,jpeg,jpg,png,rle,tif,tiff,webp,wmf
⒄for %%i in (%all%) do ( REG delete HKCUSoftwareClassesSystemFileAssociations.%%ishell用画图编辑 /f /reg:>nul >nul
⒅REG ADD "HKCUSoftwareClassesSystemFileAssociations.%%ishell用画图编辑" /v "icon" /t REG_SZ /d "%mspaint%" /f /reg:>nul
⒆REG ADD "HKCUSoftwareClassesSystemFileAssociations.%%ishell用画图编辑mand" /v "" /t REG_SZ /d ""%mspaint%" "%%"" /f /reg:>nul
⒇echo 操作完成 请按任意键退出&pause>NUL&exit
⒈echo 正在删除右键菜单 请稍候...
⒉set all=avci,avif,bmp,dib,emf,gif,heic,heif,hif,ico,jfif,jpe,jpeg,jpg,png,rle,tif,tiff,webp,wmf
⒊for %%i in (%all%) do ( REG delete HKCUSoftwareClassesSystemFileAssociations.%%ishell用画图编辑 /f /reg:>nul >nul )
⒋echo 删除完成 请按任意键退出&pause>NUL&exit