471,356 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,356 software developers and data experts.

Creating Shortcuts

Can someone show me the way to create a shortcut to the file eg "c:\test.exe"
and place it in the folder eg "c:\"? (programmatically). Example in vb.net i
need, but either in c# or j# are accepted.

Tnx
Jul 22 '05 #1
2 1025
I needed that functionality and couldn't find any built-in to the framework, so I used the WSH shell library:

IWshRuntimeLibrary.WshShortcut

(Import "IWshRuntimeLibrary" from the COM tab of "Add Reference...")

It worked for me ;)

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"VladimirHorowitz" <Vl**************@discussions.microsoft.com> wrote in message
news:6C**********************************@microsof t.com...
Can someone show me the way to create a shortcut to the file eg "c:\test.exe"
and place it in the folder eg "c:\"? (programmatically). Example in vb.net i
need, but either in c# or j# are accepted.

Tnx

Jul 22 '05 #2
>Can someone show me the way to create a shortcut to the file eg "c:\test.exe"
and place it in the folder eg "c:\"? (programmatically). Example in vb.net i
need, but either in c# or j# are accepted.


In addition to Dave's suggestion, here's another way to do it

http://www.msjogren.net/dotnet/eng/s..._shelllink.asp

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Richard Townsend | last post: by
1 post views Thread by Richard Johansson | last post: by
1 post views Thread by Jefferson Cowart | last post: by
3 posts views Thread by Marius Rus | last post: by
5 posts views Thread by PAzevedo | last post: by
331 posts views Thread by Xah Lee | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.