1

I'm trying to open an image in MS Paint 3D from Powershell. This is a working command in CMD:

mspaint "D:\124.jpg" /ForceBootstrapPaint3D

The following is what I think should work in Powershell:

Start-Process -FilePath "$env:comspec" -ArgumentList "/c mspaint `"D:\124.jpg`" /ForceBootstrapPaint3D"

Against my expectation, it opens the image in the old MS Paint, which I'd prefer not to work with. I think the flag /ForceBootstrapPaint3D is being ignored here. What is the proper way to get it recognized?

1 Answers1

0

MS-Paint is expecting arguments in a different grouping, joining the file path to /ForceBootstrapPaint3D as one parameter makes the Powershell launch work:

Start-Process -FilePath "$env:comspec" -ArgumentList "/c mspaint.exe ""C:\Temp\BLAH.JPG /ForceBootstrapPaint3D"""

or without CMD.EXE

Start-Process -FilePath "mspaint" -ArgumentList """C:\Temp\BLAH.JPG /ForceBootstrapPaint3D"""

It would be nice to know how to run Paint3D to open a specific image without resorting to the older MSPAINT.EXE in ForceBootstrapPaint3D mode. There is a url "ms-paint:" but cannot find what parameter format it requires. See also How to launch Windows 10 Paint3D from Java to open a specific file

DuncG
  • 12,137
  • 2
  • 21
  • 33