'How to find the Target *.exe file of *.appref-ms

I have to make a backup of the program running from the file *.appref-ms
When I opened the file GitHub.appref-ms using a text editor I found

http://github-windows.s3.amazonaws.com/GitHub.application#GitHub.application, Culture=neutral, PublicKeyToken=8f45a2159c87c850, processorArchitecture=x86

Where is the target stored on the local disk?
Editing the PublicKeyToken resulted in Default or Null Icon.
Editing the URL resulted in "Application Cannot Start".
How is *.appref-ms targeting the Exe?
This doesn't answer my Question

Note: I tried opening the file offline, it still works perfectly.



Solution 1:[1]

Simple answer to this; I was trying to figure out the same thing, and it just hit me.

GitHub IS a program installed on your computer, and when it runs, it WILL use threads and RAM. So that makes it a process. All you have to do is open Task Manager, click the Processes tab, find 'Github.exe', right click, Open File Location. Voila! Mine is under the folder %LocalAppData%\Apps, about 4 layers deep.

Screenshot

Solution 2:[2]

The appref-ms file does not point to the exe. When you hit that shortcut, it invokes the deployment manifest at the deployment provider url and checks for updates. It checks the application manifest (yourapp.exe.manifest) to see what files to download, and this file contains the definition of the entry point (i.e. the exe).

Solution 3:[3]

The app is stored in %LocalAppData% in your %UserProfile%. So the full path could be:

C:\Users\username\AppData\Local\GitHub

Solution 4:[4]

ClickOnce apps are designed so that the end user downloads a "downloader" - the ClickOnce app, then when ya run it, it downloads and installs in %LocalAppData%\Apps\2.0..... and then it's random folder names for every OS install you do. Backing up is pointless and so is trying to move the program. The point of ClickOnce is 2-Fold: 1. AutoUpdating of the program 2. The end user has no installer and also can't move the app or it breaks

The %LocalAppData%\Apps\2.0..... folder is the program AND %LocalAppData%\GitHub is the settings folder.

I'm not going to cover how to circumvent this - only stating the above. :P

The best 'tip' I can say legitimately is: You 'can' in some cases move the final folder that all the files are in and use a symlink back, if you are low on space. But, not all apps will work and essentially will delete the symlink once you they run. Then they might reinstall or simply just remove the link. Keep in mind also, other apps may be using that same final folder as well, so move the folder will affect those too.

Solution 5:[5]

I know this question is old, but the way I found the executable file for a similar application was to first open the application, then open Windows Task Manager, and in the "Processes" list right-click on it and choose "Open File Location".

I couldn't seem to find the location in the application reference file in my case...

Solution 6:[6]

ClickOnce applications are stored under the user's profile at %LocalAppData%\Apps\2.0\.

From there, use the search function to find your application.

Solution 7:[7]

I needed a different approach and found the installation folder of my own created "ClickOnce" application by this weird method, based on the last two answers of @fnkr and @edgeclub:

  1. Find your App "MyAppTool" by searching in the AppData Folder of your user directory with the explorer (Windows button + E):
   %appdata%/   
  1. Search in the search field of explorer for your App "MyToolApp"
   C:\Users\[USER]\AppData\Roaming\Microsoft\Windows\StartMenu\Programs\[MyAppTool]
  1. Open binary file of appref-ms in Notepad++:
   C:\Users\[USER]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\[MyAppTool]
  1. while having opened that file, open again the file->open dialog, which then appears to point to the target directory:
  C:\Users\[USER]\AppData\Local\Apps\2.0\AONBAQC0.9W3\ZG999AGR.2YN\[my..ool]_0000000000000000_0001.0005_14f3f4d5893ce2f9

Voila, one stubborn method workaround to get to the place of your ClickOnce App!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 riQQ
Solution 2 RobinDotNet
Solution 3 fnkr
Solution 4 EdgeClub
Solution 5 Chris
Solution 6 fnkr
Solution 7