473,394 Members | 1,751 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,394 software developers and data experts.

How create a desktop shortcut in c#?

thi
Hi,

How do i create an application shortcut on desktop programmically in C#? I
have done some shortcut coding before in visual basic 6 using windows
scripting host but later found out that scripting codes get block by some
application such as Norton and McAfee.

Would anyone mind give me some help or better still give me some sample
code. I would prefer API calls then windows scripting host.

Many thank you in advance.
Jul 12 '06 #1
3 39342

"thi" <th******@hotmail.comkirjoitti
viestissä:ux**************@TK2MSFTNGP04.phx.gbl...
Hi,

How do i create an application shortcut on desktop programmically in C#?
I have done some shortcut coding before in visual basic 6 using windows
scripting host but later found out that scripting codes get block by some
application such as Norton and McAfee.

Would anyone mind give me some help or better still give me some sample
code. I would prefer API calls then windows scripting host.
Look into
http://www.sorrowman.org/c-sharp-pro...o-desktop.html

there's example how to make URL shortcut or app shortcut to desktop. There
probably are better ways than these though.
Jul 12 '06 #2
Try this:
http://msdn2.microsoft.com/en-us/lib...64(d=ide).aspx

chanmm

"thi" <th******@hotmail.comwrote in message
news:ux**************@TK2MSFTNGP04.phx.gbl...
Hi,

How do i create an application shortcut on desktop programmically in C#?
I have done some shortcut coding before in visual basic 6 using windows
scripting host but later found out that scripting codes get block by some
application such as Norton and McAfee.

Would anyone mind give me some help or better still give me some sample
code. I would prefer API calls then windows scripting host.

Many thank you in advance.

Jul 12 '06 #3
thi,

In order to do this, you will want to use the IShellLink interface as
well as the IPersistFile interface (through COM interop).

Here is an article that goes into detail what you need to do it, as well
as sample code:

http://www.vbaccelerator.com/home/NE...ts/article.asp
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"thi" <th******@hotmail.comwrote in message
news:ux**************@TK2MSFTNGP04.phx.gbl...
Hi,

How do i create an application shortcut on desktop programmically in C#?
I have done some shortcut coding before in visual basic 6 using windows
scripting host but later found out that scripting codes get block by some
application such as Norton and McAfee.

Would anyone mind give me some help or better still give me some sample
code. I would prefer API calls then windows scripting host.

Many thank you in advance.

Jul 13 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Eskimo Joe | last post by:
I am trying to create a desktop icon using VB6. is this possible? -p
1
by: Tom | last post by:
I created an msi using the Setup Wizard, but don't seem to be able to create a shortcut to the applicaton on the desktop (or prompt for one) or the menu. Also, I would like to add an "uninstall"...
4
by: I_AM_DON_AND_YOU? | last post by:
There is one more problem I am facing but didn't get the solution. In my Setup Program I am not been able to create 2 things (when the program is intalled on the client machine ) : (1) create...
3
by: Michael D. Murphy | last post by:
Hi, I am searching for a way to creat desktop shortcuts when running the setup files that were created within a VB solution using the setup wizard. Thanks, Michael
7
by: GrandpaB | last post by:
I would appreciate assistance learning how to create a Desktop shortcut in my setup project. In the left pane of the Setup/File System window I right-clicked User's Desktop. From the contex...
3
by: baroque Chou | last post by:
We build a web site and have some registred user, we want to offer such a feature that the user can access our site from his or her desktop shortcut and want it be log on automatic. So I plan to...
0
by: peter.bittner | last post by:
I have developed a Windows application in Visual Studio .NET 2003 and created a Setup project for it. In the File System Editor I have added a shortcut to the User's Desktop folder to point to the...
3
by: sanghavi | last post by:
how to create a set up project in vb.net..how to run an application on a different machine
1
by: Mosa | last post by:
Dear all, I want to create a desktop shortcut using this code function MakeShortcut() { var WshShell = new ActiveXObject("WScript.Shell"); strDesktop = WshShell.SpecialFolders("Desktop");...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.