Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 12
    Given the choice between interop / wsh or reverse engineering the file format i would choose the latter. I think it is a pretty safe bet they won't change the format anytime soon. Commented Apr 6, 2011 at 13:29
  • 18
    Anuraj: You are cheating - this does not create a LNK but a URL file. Commented Aug 26, 2011 at 11:46
  • @HelgeKlein Its OK if you Registered your Application to use a URI Scheme Commented Jan 7, 2014 at 4:20
  • This is so simple. I don't care that it is a .url file instead of a .lnk assuming it ends up doing the same thing. Why wouldn't I use the simplest solution? I tested it for my purposes and it seems to work just fine. I find the only line that is really needed is "URL=" for my purposes. Commented Jun 3, 2015 at 20:57
  • Not working on Windows 10 x64:"The target "" of this Internet Shortcut is not valid ..." . I created internet link to a web resource and changed it to my exe path in Properties->Web Document->Url - it launche the app. Also, i've checked the format of windows created internet link and it is different (e.g. has some GUID field). Thus, this is not a valid format. P.S. It is better to use Uri and Uri.AbsoluteUri rather than strings in this case.
    – aderesh
    Commented Dec 16, 2016 at 20:02