Paint 3D open with


It won't win any beauty prizes, but Microsoft are uglier IMO so, I wrote a batchfile that creates an executable file Paint3D.exe within the same folder. When I open a picture with this Paint3D.exe, it runs the Paint 3D app, and uses the clipboard and simulated keystrokes to force the app to open that picture.

Batch:
// 2>NUL&@ECHO OFF&CLS&GOTO batch
/*
:batch
FOR /F "tokens=* USEBACKQ" %%F IN (`REG QUERY "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" /v InstallPath`) DO SET "InstallPath=%%F"
SET InstallPath=%InstallPath:*REG_SZ =%
FOR /F "tokens=* Eol= " %%F IN ("%InstallPath%") DO SET "InstallPath=%%F"
IF EXIST "%InstallPath%csc.exe" ("%InstallPath%csc.exe" /out:"%~dp0\Paint3D.exe" /target:winexe "%~dpnx0" /lib:%InstallPath%WPF /r:UIAutomationTypes.dll,UIAutomationClient.dll) ELSE (ECHO ERROR - Missing csc.exe)
PAUSE&EXIT
*/

using System;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Automation;
using System.Windows.Forms;

class Program
{

  [DllImport("user32.dll")]
  private static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);

  private const int KEYEVENTF_EXTENDEDKEY = 1;
  private const int KEYEVENTF_KEYUP = 2;

  public static void KeyDown(Keys vKey)
  {
    keybd_event((byte)vKey, 0, KEYEVENTF_EXTENDEDKEY, 0);
  }

  public static void KeyUp(Keys vKey)
  {
    keybd_event((byte)vKey, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
  }

  private static void OnWindowOpened(object sender, AutomationEventArgs automationEventArgs)
  {
    try
    {
      var element = sender as AutomationElement;
      if (element != null && Process.GetProcessById(element.Current.ProcessId).MainModule.FileName ==
            Environment.GetFolderPath(Environment.SpecialFolder.System)+"\\ApplicationFrameHost.exe")
      {
        WindowPattern windowPattern = null;
        windowPattern = element.GetCurrentPattern(WindowPattern.Pattern) as WindowPattern;
        if (windowPattern.WaitForInputIdle(5000))
        {
          System.Threading.Thread.Sleep(3000);
          KeyDown(Keys.LControlKey);
          KeyDown(Keys.O);
          KeyUp(Keys.O);
          KeyUp(Keys.LControlKey);
          System.Threading.Thread.Sleep(500);
          KeyDown(Keys.Space);
          KeyUp(Keys.Space);
          System.Threading.Thread.Sleep(1500);
          KeyDown(Keys.LControlKey);
          KeyDown(Keys.V);
          KeyUp(Keys.V);
          KeyUp(Keys.LControlKey);
          KeyDown(Keys.Enter);
          KeyUp(Keys.Enter);
        }
      }
    }
    catch (ElementNotAvailableException)
    {
    }
  }

  [STAThread]
  static void Main(string[] args)
  {
    if (args.Length == 1)
    {
      Clipboard.SetText(args[0]);
      System.Windows.Automation.Automation.AddAutomationEventHandler(
        eventId: WindowPattern.WindowOpenedEvent,
        element: AutomationElement.RootElement,
        scope: TreeScope.Children,
        eventHandler: OnWindowOpened);
      var p1 = "Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\CurrentVersion\\AppModel\\Repository\\Packages\\";
      var p2 = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(p1).GetSubKeyNames().Where(s => s.StartsWith("Microsoft.MSPaint_")).FirstOrDefault();
      var p3 = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(p1 + p2).GetValue("PackageRootFolder");
      Process.Start(p3 + "\\PaintStudio.View.exe");
      System.Threading.Thread.Sleep(15000);
      Automation.RemoveAllEventHandlers();
    }
  }
}
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming F16 (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
Hi Everyone,
Whatever MS did, they need to fix this. This is unacceptable. Paint 3D is an excellent app for so many reasons. The fixes on this thread are too complicated and I have no idea how to use them. I tried all the simple fixes and none of them works. I want to be able to associate .png and .jpg files to 3D so clicking on them will open them automatically with 3D. In other words I want 3D to be an option when I select "Open With" and be able to set 3D as the default. I even tried to do so in Windows 11 Settings. It doesn't even list 3D as an option to set for default. This sucks! How does one contact MS and protest.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    ASUS
I had no issue associating it with Paint3D but it does not say Paint3d, it says PaintStudioView.exe
It opens the .png directly if I want it though.

View attachment 98197
Can you walk us (me) through, step by step, what you did here? You're using Windows 11 right? There is no PaintStudio.View.exe in the selection drop-down when I try 'Open with.'
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    ASUS
My suspicion is that the app was too high end and useful to be free and someone realized it was discouraging purchases of other image editing software.
 

My Computer

System One

  • OS
    11
I want 3D to be an option when I select "Open With" and be able to set 3D as the default.
I want a big one with mayonaise and a fried boulette spéciale.
This sucks!
It does.
How does one contact MS and protest.
It's all thoroughly been explained in The Shawshank Redemption movie AFAIK.

Seriously, though. I tried my own workaround that I posted in my previous reply. For me, it works. That is, although it's a bit slow, and still takes a few extra mouse clicks if you choose to open only one time. Maybe someone else knows how that can be improved (or I might look into it myself at some point, but I am tired...). Reverting back to an older version of the Paint 3D app is not a very workable solution IMO, as you might miss out on some important bugfixes that way, and also I don't like to interfere with the Microsoft Store on my computer to make it block updates of only the Paint 3D app. (The idea to just keep reverting it back each time after it receives the update again also seems rather unappealing to me.)
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming F16 (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
Yeah, I just noticed this as well a few days ago. As frustrating as this is, it doesn't surprise me, honestly. It's just modern Microsoft business practices: "Wait, this Windows feature/app is actually fantastic and legitimately useful? GET RID OF IT!"

I stopped trying to understand their business decisions a long time ago. I think someone else in this thread said it best: "My suspicion is that the app was too high end and useful to be free and someone realized it was discouraging purchases of other image editing software."

This is really the most likely explanation. Because even third-party software and apps include themselves in the "Open With" right-click context menu options, or you can manually add software/apps to the context menu options. So, the decision to eliminate Paint 3D was clearly very deliberate. It's obvious that the Microsoft software engineers WENT OUT OF THEIR WAY to try to stop people from opening image files with Paint 3D. For whatever reason, they really DO NOT want people to be using Paint 3D anymore.

I did find an annoying workaround though. Instead of right-clicking on the image file and selecting "Open with Paint 3D" like we used to, now I just open the Paint 3D app itself. Then I open the image file from within Paint 3D. Then the image actually loads into Paint 3D and I can edit it and save it just like normal.

All of this reminds me of when Microsoft retired the old 'Windows Essentials' version of Windows Movie Maker about a decade ago, which was a perfectly satisfactory video editor. It was very useful. But of course, since it was useful and good, Microsoft said: "Nah, kill it." And to this day, Windows users complain about there being no decent video editor that comes with Windows by default, like there used to be once upon a time. And now Microsoft is trying to take away the fantastic Paint 3D photo editor.

Pardon my ranting. It's just so very frustrating to see Microsoft as they exist today. They've always been a greedy, multi-billion dollar company, but at least they used to actually care about making GOOD PRODUCTS once upon a time. Those days are gone unfortunately.
 

My Computer

System One

  • OS
    Windows 10
    Computer type
    PC/Desktop
    CPU
    i7-10700
    Motherboard
    ASRock B460m Pro4
    Memory
    32GB DDR4 (2933 MHz)
    Graphics Card(s)
    RTX 4070
    Monitor(s) Displays
    LG
    Screen Resolution
    4K
    Hard Drives
    1TB NVMe SSD
    1TB HDD
    PSU
    750w 80 Plus Gold Power Supply
    Keyboard
    EVGA
    Mouse
    Corsair
    Browser
    Chrome
I did find an annoying workaround though. Instead of right-clicking on the image file and selecting "Open with Paint 3D" like we used to, now I just open the Paint 3D app itself. Then I open the image file from within Paint 3D. Then the image actually loads into Paint 3D and I can edit it and save it just like normal.
See post #21. The little program that I wrote does this automatically for you. It requires the filepath of the image wrapped in doublequotes as the only parameter so, as a result you can right-click on the image file ➜ choose Open with ➜ click on Choose another app ➜ scroll down to the bottom ➜ click on Choose an app on your PC ➜ navigate to and select the program Paint3D.exe ➜ click on Open ➜ click on Just once.

The next time when you right-click on an image of the same filetype and you choose Open with, clicking on Choose another app should make the program Paint3D.exe appear on the list under Suggested apps. I could be wrong, but AFAIK currently on Windows 11 it is still not possible to change directly what appears in the Open with flyout menu for a given filetype so, also AFAIK, you can only change what appears under Suggested apps in the Choose another app sub-menu thereof. See also Shawn Brink's advice about that particular subject, in this thread and in this thread.
@Brink
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming F16 (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
So basically, if you still aren't happy with choosing to use the list of Suggested apps, you could always decide to use Open with++ if you have applied this tweak or, if you haven't applied this tweak, either you could decide to use ContextMenuForWindows11 or decide to still apply this tweak (and then use Open with++).

On a side note, more than just a few years ago on multiple occasions it has been pointed out by various security experts the fact that the whole mechanism designed by Microsoft to open UWP apps with URI protocols contains many critical flaws that an experienced hacker could fairly easily exploit. This might explain why Microsoft began to disable those features that allowed some UWP apps to be opened in such a way that a specified file could automatically (i.e. with no user interaction) be opened with them. So, even though Microsoft could decide at any moment to retire the Paint 3D app, I still don't think that this recent change in behavior should necessarily be interpreted as an indication, that they're planning to retire the app soon. Hopefully they will not.
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming F16 (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
Back
Top Bottom