Shortcuts are very much applied on Win32, such as when a software installation is complete and a few shortcuts are created.
To a specific directory, then in the. NET I didn't find any managed classes to manipulate shortcuts, so we
Using System; Using System.IO; Using System.Runtime.InteropServices; Class Program {static void Main (string[] args) {createshortcut (//Create Shortcut @ "C:\User S\windo\desktop\ican.lnk "@"%homedrive%/program files\internet Explorer\iexplore. EXE ", AppDomain.CurrentDomain.BaseDirectory, @"%homedrive%/p Rogram files\internet Explorer\iexplore. EXE, 0 "," ctrl+alt+z "); public static readonly GUID Clsid_wshshell = new GUID ("72c24dd5-d70a-438b-8a42-98424b88afb8"); public static string Getshortcuttarget (String lnk)//Fetch shortcut Target {if (lnk! = null && file.exists (LNK)) {Dynamic objWSHShell = null, objshortcut = NULL; try {objWSHShell = Activator.CreateInstance (Type.gettypefromclsid (Clsid_wshshell)); Objshortcut = Objwshshell.createshoRtcut (LNK); return objshortcut.targetpath; } finally {Marshal.ReleaseComObject (objshortcut); Marshal.ReleaseComObject (objWSHShell); }} return string. Empty; public static bool CreateShortcut (string lnkfilename, String TargetPath, String Argume NTS, string remark, String workingdirectory, String iconlocation, Stri Ng HotKey) {if (lnkfilename! = null && lnkfilename.length > 0) { Dynamic objWSHShell = null, objshortcut = NULL; try {objWSHShell = Activator.CreateInstance (Type.gettypefromclsid (Clsid_wshshell)); Objshortcut = Objwshshell.createshortcut (lnkfilename); Objshortcut.windowstyle = 1; Objshortcut.hotkey = Hotkey; Hotkey Objshortcut.targetpath = TargetPath; Target file objshortcut.arguments = Arguments; Parameter objshortcut.description = remark; Remark objshortcut.workingdirectory = WorkingDirectory; Starting position objshortcut.iconlocation = iconlocation; Icon position Objshortcut.save (); return true; } finally {Marshal.ReleaseComObject (objshortcut); Marshal.ReleaseComObject (objWSHShell); }} return false; } }