I have taken over support for a VB.Net WinForms application. When this application is installed via a ClickOnce install开发者_JS百科ation it generates a shortcut on the desktop. The annoying thing, though, is that if you do a right click and properties on the shortcut that was created, it is clear that it is not a regular shortcut as it does not have a target tab, so it is not obvious from the shortcut properties what this shortcut is referencing. So my questions relating to this are: what is the idea behind this kind of shortcut? Why is the the target for this type of shortcut hidden? (What are they even called? This is the first time I have ever seen a ClickOnce installation, so was somewhat surprised when I found that the properties tab was missing.) How do you find out what executable is being referenced by the shortcut?
ClickOnce shortcuts - like those created by .Net setup programs - are 'advertised shortcuts', where the operating system validates the program before running it - and, if necessary, runs a MSI Repair on it. There's no way to determine the target .exe from the shortcut.
The shortcut is an "Advertised shortcut" as described here.
In order to find out what executable is being referenced by the shortcut do the following:
- Run the application using the shortcut
- Open the task manager.
- Right click the record of the process and select Go To Process
- Right click the record of the process and select Open File Location
And walla...
精彩评论