المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : add shortcut to recent start menu



C# Programming
07-24-2012, 04:00 AM
I am using the following code to try to add shortcut to the recent part of start menu (not to the start menu programs) but nothing is happening.

where is the problem?

I am using the following code to try to add shortcut to the recent part of start menu (not to the start menu programs) but nothing is happening. where is the problem? WshShell shell = new WshShell();IWshShortcut MyShortcut;// Replace [UserName] with the name of the UserMyShortcut = (IWshShortcut)shell.CreateShortcut(Environment.GetFolderPath(Environment.SpecialFolder.Recent) + "\\" + Application.ProductName + ".lnk");MyShortcut.TargetPath = Application.ExecutablePath;MyShortcut.Description = "Launch the App!";// MyShortcut.Icon******** = [IconPath]; // [IconPath] - the path of the icon for the shortcut, if you have one MyShortcut.Save();