rothman Posted April 17, 2018 Share Posted April 17, 2018 Hello everyone maybe i've searched for the wrong key words but i could not find an existing thread about this "Issue". i’m (happily) using paint.net for a while now and just recently bought the MSStore version to support this great piece of Software Unfortunately with the Metro/App Store executable it’s not possible to call PDN from another program anymore In my case i’ve just linked „PaintDotNet.exe %1“ from my (Faststone) picture browser and could directly open PDN with the picture in it for editing... OFC i've tried to link to Program Files\WindowsApps\dotPDNLLC.paint.net_4.21.6589.0_x64__*\PaintDotNet.exe instead but it just wont start. In a search for a solution i came accross this stackoverflow thread. I can now start the app from CMD line via explorer shell:AppsFolder\dotPDNLLC.paint.net_h55e3w7q8jbva!dotPDNLLC.paint.net (id might be different for you) but it wont accept any handover params like a filename Quote Windows Store apps aren't designed to run from the command line and there isn't a straightforward way to launch them from the command line. Apps which handle specific files or protocols receive them through FileActivatedEventArgs or ProtocolActivatedEventArgs rather than command line arguments So one workarround to call a Metro App with any handover values seems URL handlers e.g. like start netflix: start ms-windows-store:updates start pdn:<filename> ?? Another option would be to register PDN as default app for all possible image filetypes and then invoke a "start <filename>" respectively link it as "cmd.exe /c start %1" But then you loose the option to simply open your pictures in your picture browser in 1st place of course -_- I know M$'s way to implement Windows Store Apps is not the DEVs fault but maybe defining Paint.Net Metro App's properties to act as (e.g. pdn:) url handler would be an easy to implement "feature" to externally call PDN without breaking the user's favorite filetype assignments. Cheers, rothman Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted April 17, 2018 Share Posted April 17, 2018 Yeah ... I didn't expect this As you say, you can start up the app by running shell:AppsFolder\dotPDNLLC.paint.net_h55e3w7q8jbva!dotPDNLLC.paint.net ... but you can't give it any command-line arguments. I'll look into this for the next update. Thanks! 1 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
mikeruiz Posted May 6, 2018 Share Posted May 6, 2018 (edited) Similar issue over here, when using the Windows Store Verison when i try to add a plugin (note, pain in the < no swearing > to find the install path : C:\Program Files\WindowsApps\dotPDNLLC.paint.net_4.21.6589.0_x64__h55e3w7q8jbva) I got access denied, I've tried a lof of things to get access to the folder, but no matter what i do, even with full control and ownership i still receive "access denied" This is happening on windows 10 also i noticed the folder "FileTypes" is missing I guess i'm switching back to the free version Edited May 6, 2018 by mikeruiz Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted May 6, 2018 Share Posted May 6, 2018 (edited) 2 hours ago, mikeruiz said: when using the Windows Store Verison when i try to add a plugin (note, pain in the < no swearing > to find the install path : C:\Program Files\WindowsApps\dotPDNLLC.paint.net_4.21.6589.0_x64__h55e3w7q8jbva) I got access denied, Not to worry, that's not the correct place to install plugins anyways. Specific instructions regarding plugins for the Store App version are here: https://www.getpaint.net/doc/latest/InstallPlugins.html#4 Edited May 6, 2018 by toe_head2001 Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 9, 2018 Share Posted August 9, 2018 Okay I just added this for the next update. To use it, you'll use the paintdotnet: protocol prefix. For example, you can to to Start -> Run, and then type in: paintdotnet:path_to_file_1.jpg "path_to_file_2 that has spaces.png" And it'll open both of those files. This works both to launch Paint.NET from scratch, and to open files in an instance of Paint.NET that's already running. It wasn't too hard, just a mix of a small addition to the AppX manifest and a P/Invoke over to CommandLineToArgvW. 1 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Bruce Bowyer-Smyth Posted August 9, 2018 Share Posted August 9, 2018 @Rick Brewster Do desktop apps support the execution alias? https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-uap5-executionalias Quote GPU Blur Plugin | WMF File Plugin Link to comment Share on other sites More sharing options...
Elimental Posted November 18, 2018 Share Posted November 18, 2018 (edited) On 8/10/2018 at 12:18 AM, Bruce Bowyer-Smyth said: @Rick Brewster Do desktop apps support the execution alias? https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-uap5-executionalias I need this as Faststone need a bat or exe file. Current method only works when you click Start -> Run and not as a command line option If I was able to use the command from a command line I could then create a getpain.bat file that contains: paintdotnet %1 I could then call the .bat file with Faststone and the Path_to_image.jpg would be passed on as %1 Maybe this could be of more help on how to call Paint.net with params from another program like say Faststone For now I guess I will have to go back to free version. Edited November 18, 2018 by Elimental Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 19, 2018 Share Posted November 19, 2018 From the command-line you can execute start paintdotnet: (with the colon!) I'm not sure if you'd need to put this in the batch file as: start paintdotnet:"%1" or start "paintdotnet:%1" or even just without any quotes. So, you should experiment until it works. The quotes may be necessary if there are spaces in the file path. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Elimental Posted November 21, 2018 Share Posted November 21, 2018 (edited) Thanx did not know about the "start" part. Batch option now works till image have spaces in the name. Even when using command line gives an error. Copied a jpg file and renamed it with a space in the name then ran: start paintdotnet:"D:\Utils\test name.jpg" Paint.net starts but prompts image type not recognized See Screenshot of error: https://imgur.com/a/R57CRsa Edited November 21, 2018 by Elimental Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted November 21, 2018 Share Posted November 21, 2018 Substituting %20 for the space was a common trick when constructing URLs. Try that. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 23, 2018 Share Posted November 23, 2018 Hmm, this is supposed to work. I'm not sure why it isn't. I'll check into it for the 4.1.5 release. Thanks for pointing this out! Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
BoltBait Posted November 23, 2018 Share Posted November 23, 2018 On 11/19/2018 at 11:46 AM, Rick Brewster said: start paintdotnet:"%1" Shouldn't this be: start paintdotnet:"%1 %2 %3 %4 %5 %6 %7 %8 %9" That way, if there are spaces in the filename, the command parameters will be caught by the 2nd, 3rd, etc. parameters. (I'm assuming that Paint.NET will trim the filename.) Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 23, 2018 Share Posted November 23, 2018 The problem isn't that the filename isn't getting sent correctly. Paint.NET isn't removing the quotation marks from the parameter is does receive. %1 in this case would end up being something like paintdotnet:"C:\somewhere\over\there\This has spaces.jpg" My code correctly removes the paintdotnet: prefix, but not the quotes. I'm a little weirded out by this because I'm almost 100% certain I tested this out -- in the release notes I even include an example that has spaces! I wonder if they changed something in the 1809 update? Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Elimental Posted November 24, 2018 Share Posted November 24, 2018 19 hours ago, BoltBait said: Shouldn't this be: start paintdotnet:"%1 %2 %3 %4 %5 %6 %7 %8 %9" You never use %1 %2 %3 ..... If you want to use all as one variable If you wanna do a catch all as one you should use %* But as mentioned, my problem is not passing it to paintdotnet, its that paintdotnet is not accepting spaces in command line. Already written a proper batch file that works with other applications, will post a full howto here once the command line section for paintdotnet works. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 30, 2018 Share Posted November 30, 2018 Okay this should be fixed up for v4.1.5 You should be able to use paintdotnet:"C:\something\with\spaces\in the filename.png" and it'll work great. Also, paintdotnet:"C:\file\first image.jpg" "C:\file\second image.jpg" should also work. To make this even better, and certainly easier to test, I think it's about time to add paintdotnet: protocol support for the Classic version as well. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Rick Brewster Posted December 6, 2018 Share Posted December 6, 2018 4.1.5 is now available and all of this should be fixed up Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
kadybugs Posted December 6, 2018 Share Posted December 6, 2018 Hey Rick, Is that pic of the blue car suppose to be my Christmas present? Since I KNOW IT IS, shoot me your email addy so I can give you my home address so you will know where to have it parked on Christmas morning. Thank you in advance, dude!! On a more serious side, I saw "paint.net" FOR SALE at the Microsoft store!! Last I knew, paint.net was free and open-source. They are selling it for $6.99. I thought I'd pass that tidbit of info to you just in case it IS NOT YOU selling it. If it ISN'T YOU SELLING it, I'd sure go raise hell with them!! I really apologize if this is not the proper place to inform you but it is 22:30 and I have been up since 07:00 working on insurance BS in the final countdown. I hope you and yours have a Very Merry Christmas and a Sparkling New Year!! Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted December 6, 2018 Share Posted December 6, 2018 Rest assured - Rick is behind the Windows Store release of paint.net Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Elimental Posted December 7, 2018 Share Posted December 7, 2018 On 12/6/2018 at 3:28 AM, Rick Brewster said: 4.1.5 is now available and all of this should be fixed up Can confirm, fixed thanx a mil. Also as promised: If people need programs like FastStone to work, just create a batch file in my example I'll call it paintdotnet.bat with the following: @echo off start paintdotnet:%* Now you can simply point to that bat file as your executable in FastStone. The %* is a catch all and works with single or multiple files, both with or without spaces in the names. 1 2 Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted December 7, 2018 Share Posted December 7, 2018 Also, the paintdotnet: protocol launching now works for the Classic version, not just the Store version. I even verified that this works on Win7. It's not just a Win10 thing. 2 1 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.