用代码创建快捷方式,但如下代码创建的快捷方式目标类型是文件,我想要的目标类型为文件夹,如何处理?

 string filename = System.Web.HttpContext.Current.Server.MapPath("/video/2/my.lnk");
 IWshShortcut shortcut = null;
 IWshShell_Class shell = new IWshShell_Class();
 shortcut = (IWshShortcut)shell.CreateShortcut(filename);
 shortcut.TargetPath = "c:\\abc";  //abc是文件夹 但创建的快捷方式 的目标类型是文件 如果设置为文件夹

 shortcut.Save();

C# 创建一个文件夹快捷方式
是不是TargetPath没写成"c:\\abc\\"

很简单,你先自己创建一个文件夹的快捷方式,然后把他当做文本文件打开看看和指向文件的快捷方式有什么不同就可以了