17-10-12, 06:10 PM
كاتب الموضوع : Boutemine Oualid
السلام عليكم و رحمة الله وبركاتهكود :
private static string desktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
private static string fileName = "Calc.lnk";
private static void Main(string[] args)
{
WshShell shell = new WshShell();
IWshShortcut link = (IWshShortcut)shell.CreateShortcut(Path.Combine(desktop, fileName));
link.TargetPath = @"C:\WINDOWS\system32\calc.exe";
link.Save();
}