0

i want to add Website Shortcut for website: http://www.google.com in user program(start-->all program) in window forms C# while we install our software setup and it install like in user program:-

demo(folder in all program)

-demo software shortcut

-website link

Thanks In Advance

andy
  • 595
  • 3
  • 8
  • 23
  • which install system you use, or is it a custom one? – eis Apr 18 '12 at 09:00
  • the answer from "eis" works very well but I need to say that the "fullURLYouWant" URL NEEDS the "/" at the end, if not the url Link doesn't work, took me some time to find this Solution. :-/ – squadwuschel May 22 '13 at 13:01

1 Answers1

0

You don't specify how or with what you want to create it. For a completely manual way

string fullURLYouWant = "http://www.google.com/";
using (StreamWriter writer = new StreamWriter(yourPath + "\\" + yourShortCutFileName + ".url"))
{
    writer.WriteLine("[InternetShortcut]");
    writer.WriteLine("URL=" + fullURLYouWant);
    writer.WriteLine("IconIndex=0");
    writer.WriteLine("IconFile=" + iconFileForYourUrl);
    writer.Flush();
}
eis
  • 51,991
  • 13
  • 150
  • 199
  • Hello Eis, It Is Solved i got a reference from this link:- http://www.naveen.com.au/asp-net/making-uninstall-for-visual-studio-setup-project/702 Thank You :-) – andy Apr 18 '12 at 13:30
  • I don't see that link giving you web urls as-is, but there is probably a way do it through the interface, too. It would've been nice if you'd specified that you want to use Visual Studio for this, and not do it programmatically. But of course, I don't say that there's anything wrong there, quite the contrary. – eis Apr 18 '12 at 16:09