问题
I need to know where the clickonce application got installed. Is there a way to find this through C#?
回答1:
For reference, the physical files end up in this directory: C:\Documents and Settings\userprofile\Local Settings\Apps in Win XP and C:\Users\\AppData\Local\Apps for Windows 7.
You can also read more about this in this question.
回答2:
Try Assembly.GetExecutingAssembly() and then check the Location property of the result. This will return the path of the currently executing assembly.
来源:https://stackoverflow.com/questions/13267784/local-installed-location-of-the-clickonce-application