Windows 11 "Edit with Paint" context menu
There seems to be a bug that crashes MsPaint.exe when using it directly from context menu. See if you can find error logs in Event Log Viewer about MSPaint.exe exiting with exception code 0x00000004 on KERNELBASE.dll
A workaround is launching MSPaint.exe from PowerShell instead. Change the registry to the following:
powershell.exe -windowstyle hidden -Command "Start-Process mspaint.exe -Argumentlist '""%1"""'"
Make sure you enable mspaint.exe alias to make the command work. Otherwiese replace mspaint.exe with full program path.
The disadvantage of this workaround is that a PowerShell window will flash before MSPaint.exe launches. To overcome this, create a VB script as follows:
set WSShell=wscript.createobject("wscript.shell")
if wscript.arguments.count > 0 then
FileName="""" & wscript.arguments(0) & """"
else
FileName=Empty
end if
WSShell.run "C:\Windows\System32\cmd.exe /min /C ""start """" ""mspaint"" " & FileName,0
Put the script somewhere and change the registry to:
wscript.exe PATH-TO-VBS-FILE "%1"