日期:2014-05-17  浏览次数:20810 次

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

------解决方案--------------------
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 
C# code
WshShell shell = new WshShell();
IWshShortcut link = (IWshShortcut)shell.CreateShortcut(filename);