Creating shortcuts

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I need some help with creating shortcuts at run-time... is this possible under the .NET framework 1.1 (I'm using C#). I've searched through the MSDN library, but find only references to the Windows Scripting Host, and I don't think this is relevant. I basically need to write some shortcut files to the computer's hard disk, based on properties (target, icon, etc) specified by the user. Please help, someone!
 
Hello,

Thanks for your post. As I understand, you want to create shorts to files
in C#. Please correct me if there is any misunderstanding.

Based on my experience and research, the framework doesn't include support
for creating shortcuts. I suggest you to use COM Interop to create shell
links. Please refer to the following MSDN article and samples:

ShellLink Sample
http://www.msjogren.net/dotnet/eng/samples/dotnet_shelllink.asp

Creating and Modifying Shortcuts
http://www.vbaccelerator.com/home/NET/Code/Libraries/Shell_Projects/Creating
_and_Modifying_Shortcuts/article.asp

Shell Links
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/pla
tform/shell/programmersguide/shell_int/shell_int_programming/shortcuts/short
cut.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top