I want to create a shortcut pointing to some EXE file, on the desktop, using .NET Framework 3.5 and relying on an official Windows API. How can I do that?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Use ShellLink.cs at vbAccelerator to create your shortcut easily !
url shortcut
Application shortcut
also check this example
if you want to use some API specific functions then you will want to use the
IShellLink interface
as well as theIPersistFile interface
(through COM interop).Here is an article that goes into detail what you need to do it, as well as sample code:
Without additional reference:
To create Shortcut on Desktop:
Here is a piece of code that has no dependency on an external COM object (WSH), and supports 32-bit and 64-bit programs:
Here's my code:
I Use simply for my app: