1 Aralık 2015 Salı

c# kısayol oluşturma

dd these references:
  1. Microsoft Shell Controls And Automation
  2. Windows Script Host Object Model
Add this namespaces:
using Shell32;
using IWshRuntimeLibrary;
Next appears to be working:
var wsh = new IWshShell_Class();
IWshRuntimeLibrary.IWshShortcut shortcut = wsh.CreateShortcut(
    Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\shorcut2.lnk") as IWshRuntimeLibrary.IWshShortcut;
shortcut.TargetPath = @"C:\Users\Zimin\Desktop\test folder";            
shortcut.Save();