csharp怎么用最简单的方法获得快捷方式所指向的目标文件或文件夹(包括完整路径)名?
谢谢!

解决方案 »

  1.   

    This trick will allow you to edit shortcut properties in Windows.1.Add Windows Script Host Object Model reference under the COM tab. To do that, right click on References in Solution Explorer and then Add Reference. 
    2.Insert the using statement: using IWshRuntimeLibrary; 3.Here is the sample code 
    WshShell shell = new WshShell();
    IWshShortcut link = (IWshShortcut)shell.CreateShortcut(filename);Now you can set and get various shortcut properties via methods in the link object.  Be sure to call the Save() to save changes you made.