1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Creating shortcuts from batch files

Discussion in 'Legacy Windows' started by jheibeck, 2004/10/13.

Thread Status:
Not open for further replies.
  1. 2004/10/13
    jheibeck

    jheibeck Inactive Thread Starter

    Joined:
    2004/10/13
    Messages:
    44
    Likes Received:
    0
    Anyone know how to create a desktop shortcut (.lnk file) to an exe from a batch file? This is driving me Crazy!
     
  2. 2004/10/14
    ReggieB

    ReggieB Inactive Alumni

    Joined:
    2004/05/12
    Messages:
    2,786
    Likes Received:
    2
    I'm sure this book gives you an example where they do just that, but I can't find it on the associated web site (the nearest I got was this), and the book is at work. If you don't get an answer today, I'll look it up tomorrow at work.
     

  3. to hide this advert.

  4. 2004/10/14
    jheibeck

    jheibeck Inactive Thread Starter

    Joined:
    2004/10/13
    Messages:
    44
    Likes Received:
    0
    Thanks, I'd sure appreciate it.
     
  5. 2004/10/15
    ReggieB

    ReggieB Inactive Alumni

    Joined:
    2004/05/12
    Messages:
    2,786
    Likes Received:
    2
    I've found the reference (p406, chapter 9) and a better link to the book. I'll have to type out the code, so their may be typos. I highly recommend that you invest in the book. It is very good and includes quite a few useful VBScript examples as well as a lot of information on how to get XP to behave the way you want it to, rather than the way MS think you should use it.

    This script can be used to create a shortcut to a application (.exe) or an internet address (.url). To create a link to a program use it like this:

    In this example we've created a shortcut (Notepad.lnk) to the Notepad application. This will create the link in the current directory, but you can add the full path ( "C:\myfolder\Notepad.lnk ") is you prefer.
     
  6. 2004/10/16
    jheibeck

    jheibeck Inactive Thread Starter

    Joined:
    2004/10/13
    Messages:
    44
    Likes Received:
    0
    Thanks. I'll give it a try and check out the book.
     
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.