谢谢!
3 个解决方案
#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
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();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.
IWshShortcut link = (IWshShortcut)shell.CreateShortcut(filename);
#2
#3
可是我是要反过来,从已有的快捷方式 得到它所指向的目标路径,怎么弄呢
#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
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();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.
IWshShortcut link = (IWshShortcut)shell.CreateShortcut(filename);
#2
#3
可是我是要反过来,从已有的快捷方式 得到它所指向的目标路径,怎么弄呢