Community discussion forum

Create a File Shortcut

This is a comment thread discussing Create a File Shortcut
  • 10 years ago

    This thread is for discussions of Create a File Shortcut.

  • 7 years ago

    This code comes in handy when creating a setup program the creates shortcuts to programs. I like it because it works with few lines of code. Thank you very much! I've been looking for this for a very long time!
    Happy programming!

  • 6 years ago

    Hello !


    When the shortcut is created, how can I read with VB or another language the value of arguments and targetpath ?


    Thanks !

  • 5 years ago

    I'm using this code but sometimes i get the message "set objshell  doesn't declare" i've assign the "WSHOM.OCX" things and the "dim " things..
    BUT
    sometimes it works, but sometime it doesn't...  Help me please
  • 2 years ago

    Hello,
         I have used your code and had success adding in the Ocx and the Dim statements, However... When I run the application I recieve a ComException. the report goes somethinglike this, ComException was unhandled: unable to save "C:\...\...\...\...\Link.lnk"

         In the error report I retrived the Com error number which is -2147467259. the error occurs the first time I run this statement: objshortcut.Save()

         Any Help Would Be Appreciated

    ~Vitus

  • 2 years ago

    Hello,
         I have used your code and it has worked well for me till now. I have added the .Ocx and the Dim statements and all has gone well. However now that I run the program I recieve a COMException.

         The error number form the report says it's -2147467259. it is raised when I call Objshortcut.Save(),and the error reads "COMException was unhandled: Unable to save file: C:\...\...\Link.lnk

         Any Help Would Be Appreciated

    ~Vitus

Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!