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?
There are a bunch of properties on System.Deployment.Application.ApplicationDeployment.CurrentDeploymentthat should answer your question.
System.Deployment.Application.ApplicationDeployment.CurrentDeployment
, .ActivationURI .UpdateLocation .
.ActivationURI
.UpdateLocation
(, , ApplicationDeployment.IsNetworkDeployed , .)
ApplicationDeployment.IsNetworkDeployed
/, appref-ms, "".
shortcutName = string.Concat(Environment.GetFolderPath(Environment.SpecialFolder.Programs), "\", publisher_name, "\", product_name, ".appref-ms" );
publisher_name product_name - "" .
.
RobinDotNet
Source: https://habr.com/ru/post/1719266/More articles:GlobalSettings ViewModel - settingsОбучение написанию многоразовых библиотек - pythonchange password without entering old password in web administration tool - asp.netimage quality degradation in Matlab - imageWCF: where to place the configuration and how to allow relative paths without HTTPContext - wcfJava text formatting - javaXcode & Interface Builder is no longer in sync - asynchronousПочему я не могу изменить Thread.Name в .NET? - multithreadingAre there any instructions in the x86 assembly that exist only in 64-bit mode? - assemblycan't see bit (1) of fields in mysql - databaseAll Articles