473,406 Members | 2,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 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 1070
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Richard Townsend | last post by:
I've seen the python.faqts page: http://www.faqts.com/knowledge_base/view.phtml/aid/4475/fid/538 on how to create windows shortcuts using Python. Does anyone know if this be adapted to create...
6
by: DraguVaso | last post by:
Hi, In my application, on some given actions while debugging in Visual Studio, I suddenly get a "System.ComponentModel.Win32Exception was unhandled" Message="Error creating window handle."...
1
by: Richard Johansson | last post by:
Hi, I want to create an option for creating shortcuts to my application on the users desktop and Start menu in the setup. In my deployment project i have created the necessary checkboxes, and...
1
by: Jefferson Cowart | last post by:
I'm looking for a way to create new shortcuts for a user. While I realize I could just pre-create all the shortcuts and just copy them in. I would prefer just to be able to specify the file i want to...
3
by: Marius Rus | last post by:
I have an application write in c# and i want to offer to the user to create himself shortcuts with icons for the main menu items. I will very much appreciate if will receive an helping hand. Thank...
1
by: tomp | last post by:
Does anyone know how to create file shortcuts in a VB program?
1
by: googleboy | last post by:
I need to create about 2000 shortcuts to a batch file. The shortcuts need to have: Name: %parameter%.lnk Target: n:\Path\To\batchfile.bat %parameter% Start In: n:\Path\To\ Where the...
5
by: PAzevedo | last post by:
With ToolStripMenuItem objects i created a 'Tools' menu and from that menu droped an Item to which i assigned a ShortcutKey of 'Keys.Control | Keys.E', and the shortcut doesn't work. This...
331
by: Xah Lee | last post by:
http://xahlee.org/emacs/modernization.html ] The Modernization of Emacs ---------------------------------------- THE PROBLEM Emacs is a great editor. It is perhaps the most powerful and...
2
by: Dmenace | last post by:
Microsoft blows my mind sometimes, what the hell were they thinking? Oh, wait they weren't, that's right. Anyway, I've got a Setup and Deployment added to my project, and it does everything I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.