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

How to access Affinity EXE files to launch them from other applications?


Recommended Posts

To say that I'm not a fan of the Microsoft Store would be an understatement.  Installing apps this way makes it a big pain to access the program files -- and there are sometimes very good reasons to do that.

So I'm searching for a way to do what ought to be so simple.  I'm using Exposure x7 and trying to add Affinity Photo as an external editor.  It's easy to point to the other applications I use, but there is no straightforward way to point to the Affinity EXE file.

This is a new laptop and I would prefer not to change all my file permissions, which should not be necessary.  I did make a brief attempt to gain access to the WindowsApps folder but it is a real nuisance -- I'd rather save that for some other time.  Windows gives access to it only to TrustedInstaller, not even to admin, and trying to gain even read-only access is a pain.  This is one reason why I'd prefer not to use applications that are installed through that store.  If Microsoft is controlling that store, then why does it need to additionally have full control over the directories on people's computers?  It's silly.

The main applications I'm using right now that are installed this way are Affinity applications.  Edge has similar issues, although it's not my main browser.  These apps have no easy-to-use EXE file, and are much harder to manipulate on the desktop and in Explorer.

Although I asked Exposure about this, I really think that it's Affinity's problem due to the (in my opinion bad) decision to use the Microsoft Store method of installation.  I'm a very experienced computer user; others come to me for help.  And yet I can't figure out a simple way to do this simple thing, and apparently Exposure support can't either.  I'm sure if I thought about it I could probably think of a silly workaround of some kind, using the registry or batch files or something ridiculous like that.

But surely someone has an easy solution for this.

Dan

Link to comment
Share on other sites

And as a p.s., I'm not super-impressed if the only way to get help is to ask in a forum.  However, I do appreciate the price points (not as good as they were, but still good), and overall that the software is well-engineered.  I appreciate that you are not using the Adobe subscription model.  I'm not sure whether this aside will be accepted or not.

Link to comment
Share on other sites

@sdan

Welcome to the Affinity forums.

I notice you mention the M$ Store, so what I write below may NOT be applicable to you, sorry.  But...

IMO, by far the "easiest" method of achieving what you quite reasonably want to do is to NOT use the .MSIX installers but rather the alternative .EXE installers!  Both are available from within your Affinity account.  You will need to uninstall the MSIX versions, perhaps taking care to save and back up any customisations, assets etc., that you currently have and then install the .EXE versions.  Then you will have full access to the program files and not be hindered by Windows sandboxing.

However, I'm not sure whether the M$ Store version actually allows you to have an "Affinity account", from which the .EXE installers can be downloaded.  If you do not have such an account I can recommend an app which allows the user to access the Windows Sandbox and its contents, TakeOwnershipEXAlways use an app like this with caution but I have used it to successfully change access permissions for otherwise-locked programs, including some in the WindowsApps folder!  And these changes are reversible!

HTH

Jeff

Win 10 Pro, i7 6700K, 32Gb RAM, NVidia GTX1660 Ti and Intel HD530 Graphics

Long-time user of Serif products, chiefly PagePlus and PhotoPlus, but also WebPlus, CraftArtistProfessional and DrawPlus.  Delighted to be using Affinity Designer, Photo, and now Publisher, version 1 and now version 2.

iPad Pro (12.9") (iOS 17.4) running Affinity Photo and Designer version 1 and all three version 2 apps.

Link to comment
Share on other sites

1 hour ago, sdan said:

... I'm using Exposure x7 and trying to add Affinity Photo as an external editor.  It's easy to point to the other applications I use, but there is no straightforward way to point to the Affinity EXE file. ...

See the aflaunch.exe tool download here in that thread ...

 

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

Or, if the application you want to invoke Photo from lets you provide a command to invoke Photo, rather than requiring you to point to an EXE, you may just be able to tell it to invoke affinityphoto2 or affinityphoto2.exe, which is supplied as an App Execution Alias.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.5, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.5

Link to comment
Share on other sites

  • 3 weeks later...

aflaunch.exe only launches Affinity Photo 2. Does anyone know about a similar tool for Affinity Designer 2 and Affinity Publisher 2? I want to be able to launch the applications from a different user in the same Windows PC. For Affinity Photo 2 it does seem to work.

 

Thanks and regards,

Link to comment
Share on other sites

6 hours ago, NoobUser said:

aflaunch.exe only launches Affinity Photo 2.

That is not correct. It should launch any of the applications, if you can provide command-line arguments. From the initial post that described it,

Usage: aflaunch -a name -b build [args]

-a name    : One of the following
    Designer2
    Photo2 [Default]
    Publisher2

-b build   : One of the following
    Retail [Default]
    Beta
    MSStore

args       : [Optional] All remaining arguments to be passed onto the target application (must be last)
 

 

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.5, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.5

Link to comment
Share on other sites

  • 4 weeks later...

Hi guys.  Thanks for the reply, and sorry for my own late response.

Yes, this is way more complicated than it ought to be.  Perhaps Affinity (I keep wanting to say Serif) should consider not using the Microsoft Store at all if it's going to create headaches like this.

I will probably have to get used to software from the Microsoft Store at some point, so for now I have kept those editions.

You all were helpful, and the support people at Exposure were helpful as well -- it seems easier to contact them than to contact Affinity directly.

Now, it's a bit ironic given that the Microsoft Store is Microsoft's latest and not-so-greatest way to install software, that the quickest solution here involves using a good-old-fashioned batch (.BAT) file.  Whoa, Doc, that's heavy.  I think there's a problem with the Earth's gravitational pull!  Or maybe I just haven't been to 1985 for awhile!

It's true.  The solution that was posted in the forum linked above did work.  But you have to view two separate threads in order to piece together what to do, and even then, it's hard to believe that the solution in 2023 for Windows 11 involves using a text editor to create a .BAT file.

In any case, I will go over this for anyone who still doesn't know what to do.

Of course, Windows, having been engineered by the Byzantine Empire, has the EXE files for its app store programs listed twice, once in C:\Program Files\WindowsApps, and once in C:\Users\[USERNAME]\AppData\Local\Microsoft\WindowsApps.

The folder C:\Program Files\WindowsApps is locked tighter than Fort Knox, so gaining even read-only access to it is a pain even for the system administrator.  Yes, using a tool like TakeOwnershipPro or TakeOwnershipEx may be the easiest way to crack in there, but I wouldn't really suggest using these sorts of tools too often in Windows.  I've used them when Windows locked me out of my own backup files, but messing around in official Windows folders with these tools risks jeopardizing your security.  (Sure, in this case I don't agree with Microsoft giving TrustedInstaller power over the system administrator, but even so, I have trouble officially recommending this approach to too many people.)

But I want to keep this as simple as possible given how dumb the whole thing is.

In order to get an external program (in this case Exposure, which makes a nice complement to Affinity Photo) to recognize Affinity Photo, I had to create a batch file.  Open Notepad, and type this:  

start /b AffinityPhoto2.exe %1
exit

I saved the file as "aplaunch.bat" -- make sure it's "aplaunch.bat", and not "aplaunch.bat.txt"!

I saved it in the folder C:\Users\[YOUR USER FOLDER]\AppData\Local\Microsoft\WindowsApps .

That's where the weird alias to affinityphoto2.exe is.  It's not really an official alias or shortcut of any kind, just a 0k EXE file.  Again, nice weird engineering there, Microsoft.  What the hell?

Then you "simply" (so simple) point the external program to your batch file, in this case aplaunch.bat .

Why a BAT file can be launched in the same directory as an EXE file that cannot be launched is beyond me.  Ask Bill Gates.

 

Additional notes:

Note that I write "YOUR USER FOLDER" and not "USER NAME" which is what the official Affinity post says, because in Windows 11 as I have learned -- again, thanks Microsoft -- a user folder can be different than a user name.

That WindowsApps directory ought to be a standard Windows PATH, so it shouldn't really matter where you put the batch file.  But your batch file could also be:

 

start /b C:\Users\[YOUR USER FOLDER]\AppData\Local\Microsoft\WindowsApps\affinityphoto2.exe %1
exit

 

For Designer, adlaunch.bat:

start /b AffinityDesigner2.exe %1
exit

For Publisher (to me the gem in the suite!), apublaunch.bat:

start /b AffinityPublisher2.exe %1
exit

 

And note that if you want to use spaces in a path in the batch file for some reason -- you shouldn't here -- you have to use a funny convention:

start /b "" "C:\Users\sdanm\AppData\Local\Microsoft\WindowsApps\AffinityPhoto2.exe" %1
exit

The first set of double quotes there are because "start" assumes that the first item in quotes is what you want for the new console window title (which is not relevant in this case).

So, yeah, bottom line, what would we do without the Microsoft Store making our lives so easy?  All we need to do is to pop in the flux capacitor, accelerate up to 88 mph, go back to 1985, and learn how to write batch commands.  Whew.

You're welcome for the Bill & Ted tour back into days gone by.  Be excellent, dudes, and party on!  

 

 

Link to comment
Share on other sites

22 minutes ago, sdan said:

Perhaps Affinity (I keep wanting to say Serif) should consider not using the Microsoft Store at all if it's going to create headaches like this.

Serif is correct. Affinity is an application suite. Serif is the company that developed it. 

 

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.5, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.5

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.