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

Adding desktop shortcuts and start program entries

Can anyone tell me if there is a .net way of doing these things.

I have VB6 code but assume there is a new way.

Thanks
Nov 21 '05 #1
7 3331
Jack,

Do you mean, keys (that goes the same)?

Or do you mean deployment?.

Or something else?

Cor
Nov 21 '05 #2
Hi you can use this to create a shortcut on the desktop:

Private Sub CreateShort()
Dim m_Shortcut As ShellShortcut
m_Shortcut = New ShellShortcut(Environment.GetFolderPath
_(Environment.SpecialFolder.DesktopDirectory) & "\YourApp.lnk")
With m_Shortcut
.Path = "Path to your app"
.WorkingDirectory = "path to the working directory"
.Description = "Description"
.Save()
End With

End Sub

hth

Greetz Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.

"Cor Ligthert" <no************@planet.nl> schreef in bericht
news:#Q**************@TK2MSFTNGP12.phx.gbl...
Jack,

Do you mean, keys (that goes the same)?

Or do you mean deployment?.

Or something else?

Cor

Nov 21 '05 #3
Cor Ligthert wrote:
Jack,

Do you mean, keys (that goes the same)?

Or do you mean deployment?.

Or something else?

Cor

I am thinking of writing my own "deployment" program in .net since I can
get the setup bootstrap to install dotnetfx and hopefully start my
program . So I want to set up a desktop shortcut to the program that I
will install and add a group and shortcut to the Start, All programs list.

With VB6 I just modified setup1 and I would do the same here if I could
but it seems they do not give us the source of the windows installer and
even if they did I doubt that it would be in VB.

After typing all this I realise I have not quite worked out how to get
the bootstrap to start my program!

Jack
Nov 21 '05 #4
"Jack Russell" <ja***@norubbish.tpg.com.au> schrieb:
Can anyone tell me if there is a .net way of doing these things.


Where/when do you want to do that? Typically a setup program is used to add
start menu entries and desktop shortcuts. VS.NET's setup editor supports
specifying such shortcuts.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5
Peter,

"Peter Proost" <pp*****@nospam.hotmail.com> schrieb:
Hi you can use this to create a shortcut on the desktop:

Private Sub CreateShort()
Dim m_Shortcut As ShellShortcut


Where did you find the 'ShellShortcut' class?

BTW: I am just curious why you are using the 'm_' prefix for a local
variable ;-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #6
ooops, I should have posted this link:

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

My bad

Greetz Peter, and as for the m_prefix, there is no logical explanation
except if I'm one of the reasons why the universe is winning (see my footer)

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schreef in bericht
news:Oa*************@TK2MSFTNGP15.phx.gbl...
Peter,

"Peter Proost" <pp*****@nospam.hotmail.com> schrieb:
Hi you can use this to create a shortcut on the desktop:

Private Sub CreateShort()
Dim m_Shortcut As ShellShortcut


Where did you find the 'ShellShortcut' class?

BTW: I am just curious why you are using the 'm_' prefix for a local
variable ;-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #7
forgot to add a big :-)

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.

"Peter Proost" <pp*****@nospam.hotmail.com> schreef in bericht
news:#5**************@TK2MSFTNGP09.phx.gbl...
ooops, I should have posted this link:

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

My bad

Greetz Peter, and as for the m_prefix, there is no logical explanation
except if I'm one of the reasons why the universe is winning (see my footer)
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schreef in bericht
news:Oa*************@TK2MSFTNGP15.phx.gbl...
Peter,

"Peter Proost" <pp*****@nospam.hotmail.com> schrieb:
Hi you can use this to create a shortcut on the desktop:

Private Sub CreateShort()
Dim m_Shortcut As ShellShortcut


Where did you find the 'ShellShortcut' class?

BTW: I am just curious why you are using the 'm_' prefix for a local
variable ;-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Nov 21 '05 #8

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: Roy G. Vervoort | last post by:
I would like to create a shortcut on my desktop and be able to start a program (.exe) from the prgram tree (start > Programs > name program). Normally it wil be created with the setup program...
0
by: Blake | last post by:
Hello, Does anyone know if there is any way to add a condition to your setup project so that the user can choose if they want a desktop shortcut or a program menu by selecting a checkbox. I...
0
by: Mike Cooper | last post by:
Hi all, I am attempting to deploy a vb.net application. That is working fine. I also configured the installer so shortcuts for the application would appear on the desktop and the user program...
3
by: headware | last post by:
I have an issue that I've been encountering in an ASP application I'm working on. Most of the application is written in ASP, but there is one page written in ASP.NET. The ASP.NET page needs to have...
0
by: | last post by:
Hi all! How can I add "internet shortcuts" in the Start/User's Program Menu while deploying a VB.net setup project? When I try to "create new shortcut", Visual Studio warning me: "You cannot use...
2
by: Darko Topolsek | last post by:
Hi. I'm wondering, can I make desktop shortchut through Java code. Thanks. Warm Regards Darko Topolsek
3
by: Henrik | last post by:
I need to get a list of clickable objects on the desktop and their positions. I have written a small program in C# and by using the Win32 function: WindowFromPoint -function I get a handle to the...
13
by: Lloyd Dupont | last post by:
A friend of mine has little kid. Big enough to use the computer. He created a kid user with restricted user account for his kid but he would like to remove the confusing start menu, etc.... with a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.