Windows 11 "Edit avec Paint" menu contextuel

Je suis trying to add quelque chose like clic droit “Edit” to open images in paint. In Windows 11 it says “Edit avec Photos” so J’ai essayé de ajoutez un nouveau entry. Je ne peux pas get this to work. Des idées ?

Ordinateur\HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\Edit avec Paint\command

"C:\Program Files\WindowsApps\Microsoft.Paint_11.2110.0.0_x64__8wekyb3d8bbwe\PaintApp\mspaint.exe" "%1"

There seems to be a bug that crashes MsPaint.exe when using it directly from menu contextuel. See if vous pouvez find erreur logs in Event Log Viewer about MSPaint.exe exiting avec exception code 0x00000004 on KERNELBASE.dll

A workaround is launching MSPaint.exe from PowerShell à la place. Changez le registry vers le following:

powershell.exe -windowstyle hidden -Command "Start-Process mspaint.exe -Argumentlist '""%1"""'"

Assurez-vous you activer mspaint.exe alias to make the command work. Otherwiese replace mspaint.exe avec full programme chemin.

The disadvantage of this workaround is that a PowerShell window will flash avant MSPaint.exe launches. To overcome this, créez un 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 changez le registry to:

wscript.exe PATH-TO-VBS-FILE "%1"