Jump to content
You must now use your email address to sign in [click for more info] ×

Command-Line Argument Support for UWP MS Store Apps


Recommended Posts

So I've run into a conundrum - the Affinity suite of apps that I purchased from the Microsoft Store doesn't appear to have command-line support. This is because those Windows Apps downloaded from the store are sandboxed off away from users. You cannot directly find the `Photo.exe` file from the Explorer (unless you're willing to blow away a lot of permissions). The best I could find on how to start Affinity Photo from the MS Store from the command line is the following:

powershell.exe explorer.exe shell:AppsFolder\$(get-appxpackage -name SerifEuropeLtd.AffinityPhoto ^| select -expandproperty PackageFamilyName)!SerifEuropeLtd.AffinityPhoto

But that doesn't allow me to pass in any arguments into the Photo executable. There does appear to be a solution though.

First - the Affinity Suite of apps could use Command Line Activation. That would basically set up an alias so that users of the command line could send arguments to that exec alias. The apps would just need to update their OnActivated handlers for the new CommandLineLaunch activation kind.

Another option could be to create and register a Protocol. This is similar to the Command Line Activation, but now you can have the Affinity apps open based on URL. For example, afphoto:// could open up Photo, and afphoto://file=foo.tif could open load the foo.tif file into Photo. Maybe you could even supply actions to Merge or create HDR from URL parameters - but that would just be icing on the cake.

If your curious about my reasoning (like, who really needs to use the command line for this!?!?), it's that the UWP MS Store app boundaries are preventing integration with my DAM. I use Capture One, and C1 cannot find Affinity Photo because I cannot navigate to the app from the Windows Explorer (files and packages are hidden). By having these entry points, it could allow for me to create an extension to Capture One or a batch command wrapper so that I can send the files I want to edit over to Photo. To be clear, if I had purchases Photo directly from Serif, this wouldn't be an issue since the app gets installed in Program Files and I can browse for that.

Thanks for your consideration. I hope the links show that to enable the feature wouldn't require too much code to get that done (well, how could I really know, I haven't seen your code) and would love to see that. I thought purchasing the MS Store version would just mean the apps would behave the same and that I wouldn't have to worry about performing updates manually - but now I know a little more about how UWP apps work and sorta regret doing so.

Cheers and all the best

Link to comment
Share on other sites

I have a similar issue, got Affinity Photo from the MSFT store and will like to access Affinity from within Capture One. But CO will not open an app that lacks the .exe.

I thought I was buying a 100% functional copy of Affinity, I guess I was wrong. Affinity can you fix this? 

Link to comment
Share on other sites

  • 3 months later...

I have the same problem and it feels a little bit like I got a stripped down MS store version of an otherwise great application. I payed for a "full" version. How and when can we fix this, without hassle and debugging and all the technical hurdles. i want a seamless experience!

please Affinity, respond.

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.
Note: Your post will require moderator approval before it will be visible.

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.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.