1

I have a nodeJS script that runs through Inkscape SVG file and exports certain layers using this command:

  inkscape.exe "myfile.svg" -i ${id} -j -C --export-png="${outPath}"

However on my new system, I installed inkscape via Windows Store and now the executable is somewhere in C:\ProgramFiles\WindowsApps, which is not accessible. I could change the permissions, but I suppose the folder is locked for a good reason.

Is there a way to run windows app without accessing that folder? I would like solution that works for most apps, not just Inkscape.

5
  • Wouldn't it be easier to install the 32-bit or 64-bit version of Inkscape? It would avoid your issue altogether.
    – Ramhound
    Aug 24, 2019 at 13:00
  • @Ramhound Sure, that's probably what I'm gonna do while waiting for an answer. But I was curious about this, that's why I asked. "Install inkscape from website" is not an answer to the question in the title. Aug 24, 2019 at 13:02
  • So which directory within WindowsApps is Inkscape located in? I know what needs to be done but I am not willing to install the application myself, in order to answer, my own question.
    – Ramhound
    Aug 24, 2019 at 13:12
  • I would like a solution that works for most apps, not inkscape specifically. I thought the answer would be along the lines of MadeUpWindowsAppsTool.exe -start "AppNameHere", but after some googling it seems that it's not that simple Aug 24, 2019 at 13:16
  • While it isn't that simple, it is indeed, simple to start an UWP application from the command prompt.
    – Ramhound
    Aug 24, 2019 at 13:45

2 Answers 2

1

Note:

For the purposes of creating this answer, instead of using Inkscape, I used the UWP application Windows Calculator.

However on my new system, I installed Inkscape via Windows Store and now the executable is somewhere in C:\ProgramFiles\WindowsApps, which is not accessible. I could change the permissions, but I suppose the folder is locked for a good reason.

If you change the permissions on WindowsApps to anything other than their default, the results are undefined, and UWP applications will cease to work.

Is there a way to run windows app without accessing that folder?

It is indeed possible to run a UWP application from the command prompt.

  1. Run the following PowerShell command

    get-appxpackage > Result.txt

  2. Navigate to %UserProfile% and open Result.txt

  3. Determine the InstallLocation for Windows Calculator.
  4. Determine the PackageFamilyName for Windows Calculator.
  5. Navigate to the InstallLocation with File Explorer.
  6. Open AppManifest.xml with Notepad
  7. Determine the Application ID for Windows Calculator. I typically search for the Executable of the UWP application I am trying to start.
    • There are cases where multiple UWP packages will exist in the same folder. This means that AppManifest.xml will handle multiple executables.
  8. Within a command prompt type the following:

    explorer.exe shell:appsFolder\Microsoft.WindowsCalculator_8wekyb3d8bbwe!App

  9. If you found the correct Application ID for the application then Windows Calculator will start.

The install location for UWP applications are not static, as new versions are released, their location will change. So by following this guide I determined that the current PackageFamilyName of Windows Calculator was Microsoft.WindowsCalculator_8wekyb3d8bbwe and the Installation ID was APP

This will work for any UWP application, so I repeated the process for Windows Live Calendar, and ran explorer.exe shell:appsFolder\microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.calendar which resulted in the Windows Calendar being started.

0
1

While the answer by @Ramhound is pretty complete, the part of discovering the Store-installed UWP application can be improved:

  1. In the Windows Run dialog (Win+R), run shell:AppsFolder
  2. Find the application in question in the folder
  3. Right-click and choose "Create Shortcut"
  4. Say "Yes" to "place the shortcut on desktop"
  5. Right-click the shortcut and choose "Properties"
  6. The entry in the "Target" field is the id you need.
  7. Copy the id (if you can)
  8. The app can now be invoked by:

     explorer.exe shell:appsFolder\app-id
    

If you cannot copy the "Target" field and have no product that can pick it up (I used Capture2Text), you may either use the procedure of Ramhound or the one in the article Starting Windows 10 "Store App" from the command line.

1
  • Once you have a shortcut on the Desktop (after step 4), you can simply drag that shortcut onto the Quick Launch bar, making a copy Aug 8, 2020 at 11:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .