rothman

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

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now