Jump to content

paid AppStore Version can't be opened from another App


Recommended Posts

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 B)

 

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

 

Link to comment
Share on other sites

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!

  • Like 1

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

  • 3 weeks later...

Similar issue over here, 

when using the Windows Store Verison when i try to add a plugin (note, pain in the &lt; no swearing &gt; 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 by mikeruiz
Link to comment
Share on other sites

2 hours ago, mikeruiz said:

when using the Windows Store Verison when i try to add a plugin (note, pain in the &lt; no swearing &gt; 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 by toe_head2001

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

  • 3 months later...

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.

  • Like 1

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

  • 3 months later...
On 8/10/2018 at 12:18 AM, Bruce Bowyer-Smyth said:

 

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 by Elimental
Link to comment
Share on other sites

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.

 

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

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 by Elimental
Link to comment
Share on other sites

Substituting %20 for the space was a common trick when constructing URLs. Try that.

Link to comment
Share on other sites

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.)

Link to comment
Share on other sites

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?

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

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!!

Link to comment
Share on other sites

Rest assured - Rick is behind the Windows Store release of paint.net ;)

 

Link to comment
Share on other sites

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. 

  • Like 1
  • Upvote 2
Link to comment
Share on other sites

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.

  • Like 2
  • Upvote 1

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...