|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Adding desktop shortcuts and start program entriesCan 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 Jack,
Do you mean, keys (that goes the same)? Or do you mean deployment?. Or something else? Cor 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 -- Show quoteHide quoteProgramming 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" <notmyfirstn***@planet.nl> schreef in bericht news:#QXjhxTfFHA.3256@TK2MSFTNGP12.phx.gbl... > Jack, > > Do you mean, keys (that goes the same)? > > Or do you mean deployment?. > > Or something else? > > Cor > > Peter,
"Peter Proost" <pproost@nospam.hotmail.com> schrieb: Where did you find the 'ShellShortcut' class?> Hi you can use this to create a shortcut on the desktop: > > Private Sub CreateShort() > Dim m_Shortcut As ShellShortcut 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/> ooops, I should have posted this link:
http://www.msjogren.net/dotnet/eng/samples/dotnet_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) -- Show quoteHide quoteProgramming 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]" <hirf-spam-me-here@gmx.at> schreef in bericht news:OakPn$WfFHA.576@TK2MSFTNGP15.phx.gbl... > Peter, > > "Peter Proost" <pproost@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/> > forgot to add a big :-)
-- Show quoteHide quoteProgramming 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" <pproost@nospam.hotmail.com> schreef in bericht news:#5cOVGXfFHA.3656@TK2MSFTNGP09.phx.gbl... > ooops, I should have posted this link: > > http://www.msjogren.net/dotnet/eng/samples/dotnet_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]" <hirf-spam-me-here@gmx.at> schreef in bericht > news:OakPn$WfFHA.576@TK2MSFTNGP15.phx.gbl... > > Peter, > > > > "Peter Proost" <pproost@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/> > > > > Cor Ligthert wrote:
> Jack, I am thinking of writing my own "deployment" program in .net since I can > > Do you mean, keys (that goes the same)? > > Or do you mean deployment?. > > Or something else? > > Cor > > 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 "Jack Russell" <ja***@norubbish.tpg.com.au> schrieb: Where/when do you want to do that? Typically a setup program is used to add > Can anyone tell me if there is a .net way of doing these things. 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/> |
|||||||||||||||||||||||