How to read installer shortcuts with C# (WPF) -


background: I have decided to teach myself from WPF to C #, and I have a small Apps need to get started menu shortcuts and their target list and archive them. Actually, I am trying to take all shortcuts and put the path of their target applications in memory. However, I have a problem trying to read Windows Installer shortcuts (which is the C: \ Windows \ Installer \ {90120000-0030-0000-0000-0000000FF1CE} \ wordicon.exe - Microsoft Office is one of the Is a good example). I have done some research and it seems that the Windows uses some back-to-screen magic to connect to the registry to find the actual location of the file.


Question: Do I get the actual goal of these Windows Installer shortcuts in C #? I have a lot of sources that point me on the IShellLink interface, but I do not know how to use it with C #. I prefer to use Windows API calls (or better, a NAT library) instead of searching the registry manually, but I take some guidance on this issue.

After doing more research, I got an easy answer. It's basically using a combination of MsiGetShortcutTarget and MsiGetComponentPath functions of msi.dll .


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -