473,770 Members | 4,553 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3345
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(E nvironment.GetF olderPath
_(Environment.S pecialFolder.De sktopDirectory) & "\YourApp.l nk")
With m_Shortcut
.Path = "Path to your app"
.WorkingDirecto ry = "path to the working directory"
.Description = "Descriptio n"
.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******** ******@TK2MSFTN GP12.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***@norubbis h.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******** *****@TK2MSFTNG P15.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******** ******@TK2MSFTN GP09.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******** *****@TK2MSFTNG P15.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
27027
by: Eskimo Joe | last post by:
I am trying to create a desktop icon using VB6. is this possible? -p
1
2310
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 but i can not use this. thanks for any suggestions, Roy The Neterlands
0
1223
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 know that you can use conditions on files, but I can't get it to work with shortcuts. I tried to apply the condition to the folders instead of the shortcuts themselves, but the setup program doesn't seem to care. It just ignores if the checkboxes...
0
360
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 menu. That's working too. What isn't working is the icon that I am setting for these shortcuts. The icon is a .ico file that works fine for the program itself, and for any shortcuts that I manually create. After I created the shortcuts of the...
3
2849
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 access to the ASP Session data to run correctly. In order to achieve this I create my own HTTP request for a certain ASP page with the name of Session variable that I want is stored in the query string of the request. The requested ASP page...
0
1273
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 an internet address here. Enter a path that points to a location on your computer or on the network". I know that "link" files in Windows have .url extension. So these are simply... files. But I can't add them to my setup project :-( Any idea?
2
6274
by: Darko Topolsek | last post by:
Hi. I'm wondering, can I make desktop shortchut through Java code. Thanks. Warm Regards Darko Topolsek
3
4760
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 desktop but now I'm stuck. For those who need to see the code -look below IntPtr hWnd = Win32.WindowFromPoint(Cursor.Position); With the handle I can get alot of cool information such as: Caption,
13
1647
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 simple, home made, kiosk style, fullscreen GUI interface. Which could just launch a bunch of game and logout/shutdown. And he ask how to do that. But I don't know!
0
9602
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9439
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10237
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9882
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8905
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7431
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5326
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5467
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.