One-time location after installation from the application

I want to programmatically determine the "publishing location" (the location on the server that contains the installation) of the application that I launch immediately. I know that the appref-ms file contains this information, and I can analyze this file to find it, but the application has no idea about the location of the appref-ms file, and I cannot find a way to determine this location.

Does anyone have any ideas how I can easily locate the publication from my application?

+3
source share
2 answers

There are a bunch of properties on System.Deployment.Application.ApplicationDeployment.CurrentDeploymentthat should answer your question.

, .ActivationURI .UpdateLocation .

(, , ApplicationDeployment.IsNetworkDeployed , .)

+5

/, appref-ms, "".

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

publisher_name product_name - "" .

.

RobinDotNet

0

Source: https://habr.com/ru/post/1719266/


All Articles