![]() |
| | #1 |
| Registered User Join Date: Nov 2006
Posts: 6
| Desktop Shortcut Thanks, Josh |
| Jster is offline | |
| | #2 |
| Registered User Join Date: Nov 2006
Posts: 6
| Figured it out. By using the WIndows scripting object host as a reference and putting "using IWshRuntimeLibrary;", this function creates the desktop shortcut. Code: private void appShortcutToDesktop()
{
string shortcutFullName = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + "\\Name.lnk";
WshShell shell = new WshShellClass();
IWshShortcut link = (IWshShortcut)shell.CreateShortcut(shortcutFullName);
link.TargetPath = "C:\\FOLDER\\EXECUTEME.exe";
link.Description = "DESC OF WHOAH";
link.Save();
}
|
| Jster is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Extended Desktop Dimensions | Jaken Veina | Windows Programming | 2 | 01-16-2009 09:15 AM |
| Getting Icons from the Desktop | Mastadex | Windows Programming | 6 | 08-29-2007 04:33 PM |
| "Organizing" Your Desktop for Coding | skim | Windows Programming | 2 | 03-13-2006 06:52 PM |
| Showing Desktop SW_DEFAULT | Yuri | Windows Programming | 6 | 11-20-2005 01:28 PM |
| shortcut problem | Micko | Tech Board | 3 | 09-17-2004 03:01 PM |