Specify the location of the appref-ms file?

Is there any guaranteed way to get the location of the ".appref-ms" file of any application other than the executable application?

+5
source share
1 answer

Yes, you can. Try it:

shortcutName = string.Concat(Environment.GetFolderPath(Environment.SpecialFolder.Programs),
  "\\", company, "\\", description, ".appref-ms");

where the company is the publishing company in the Options dialog box and Description is the name of the product in the Options dialog box.

I use this code mainly in my application, pulling assembly information. I make sure that the Assembly Company always matches the publishing company, and the assembly description always matches the product name.

+6
source

All Articles