@echo off
CLS
color 1f
TITLE Checking for Admin...
echo.
cd %systemroot%\system32
call :IsAdmin

TITLE Windows 10 Restore 'Edit with Paint3D' Context Menu entry
cls
color 1f
echo.
ver | findstr /i " 10\.0\." > nul
IF "%ERRORLEVEL%" EQU "0" goto :Win10
echo This script only works on Windows 10 Kernels.
echo.
pause
exit

:Win10
cls
echo.
echo Restore the 'Edit with Paint3D' Context Menu entry.

reg add "HKLM\SOFTWARE\Classes\SystemFileAssociations\.bmp\Shell\3D Edit" /ve /t REG_SZ /d "@%%SystemRoot%%\system32\mspaint.exe,-59500" /f >nul 2>&1
reg add "HKLM\SOFTWARE\Classes\SystemFileAssociations\.bmp\Shell\3D Edit\command" /ve /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\mspaint.exe \"%%1\" /ForceBootstrapPaint3D" /f >nul 2>&1
reg add "HKLM\SOFTWARE\Classes\SystemFileAssociations\.jpeg\Shell\3D Edit" /ve /t REG_SZ /d "@%%SystemRoot%%\system32\mspaint.exe,-59500" /f >nul 2>&1
reg add "HKLM\SOFTWARE\Classes\SystemFileAssociations\.jpeg\Shell\3D Edit\command" /ve /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\mspaint.exe \"%%1\" /ForceBootstrapPaint3D" /f >nul 2>&1
reg add "HKLM\SOFTWARE\Classes\SystemFileAssociations\.jpg\Shell\3D Edit" /ve /t REG_SZ /d "@%%SystemRoot%%\system32\mspaint.exe,-59500" /f >nul 2>&1
reg add "HKLM\SOFTWARE\Classes\SystemFileAssociations\.jpg\Shell\3D Edit\command" /ve /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\mspaint.exe \"%%1\" /ForceBootstrapPaint3D" /f >nul 2>&1
reg add "HKLM\SOFTWARE\Classes\SystemFileAssociations\.jpe\Shell\3D Edit" /ve /t REG_SZ /d "@%%SystemRoot%%\system32\mspaint.exe,-59500" /f >nul 2>&1
reg add "HKLM\SOFTWARE\Classes\SystemFileAssociations\.jpe\Shell\3D Edit\command" /ve /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\mspaint.exe \"%%1\" /ForceBootstrapPaint3D" /f >nul 2>&1
reg add "HKLM\SOFTWARE\Classes\SystemFileAssociations\.png\Shell\3D Edit" /ve /t REG_SZ /d "@%%SystemRoot%%\system32\mspaint.exe,-59500" /f >nul 2>&1
reg add "HKLM\SOFTWARE\Classes\SystemFileAssociations\.png\Shell\3D Edit\command" /ve /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\mspaint.exe \"%%1\" /ForceBootstrapPaint3D" /f >nul 2>&1
reg add "HKLM\SOFTWARE\Classes\SystemFileAssociations\.gif\Shell\3D Edit" /ve /t REG_SZ /d "@%%SystemRoot%%\system32\mspaint.exe,-59500" /f >nul 2>&1
reg add "HKLM\SOFTWARE\Classes\SystemFileAssociations\.gif\Shell\3D Edit\command" /ve /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\mspaint.exe \"%%1\" /ForceBootstrapPaint3D" /f >nul 2>&1
reg add "HKLM\SOFTWARE\Classes\SystemFileAssociations\.tif\Shell\3D Edit" /ve /t REG_SZ /d "@%%SystemRoot%%\system32\mspaint.exe,-59500" /f >nul 2>&1
reg add "HKLM\SOFTWARE\Classes\SystemFileAssociations\.tif\Shell\3D Edit\command" /ve /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\mspaint.exe \"%%1\" /ForceBootstrapPaint3D" /f >nul 2>&1
reg add "HKLM\SOFTWARE\Classes\SystemFileAssociations\.tiff\Shell\3D Edit" /ve /t REG_SZ /d "@%%SystemRoot%%\system32\mspaint.exe,-59500" /f >nul 2>&1
reg add "HKLM\SOFTWARE\Classes\SystemFileAssociations\.tiff\Shell\3D Edit\command" /ve /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\mspaint.exe \"%%1\" /ForceBootstrapPaint3D" /f >nul 2>&1

:Done
echo.
echo All Done.
echo.
pause

exit

exit
=====================================================================================
:IsAdmin
Reg.exe query "HKU\S-1-5-19\Environment"
If Not %ERRORLEVEL% EQU 0 (
 Cls & echo. & Echo You must have administrator rights to continue ... & echo.
 Pause & Exit
)
Cls

exit /b