Community discussion forum

Create a File Shortcut

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

    This thread is for discussions of Create a File Shortcut.

  • Advertisement

    Simply the fastest line-level profiler for .NET ever

    “The low overhead means it has minimal impact on the execution of my program”
    Mark Everest, Development Team Leader, Renault F1 Team Ltd.

    Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now

  • 6 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!

  • 5 years ago

    Hello !


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


    Thanks !

  • 4 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

  • 1 year 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

  • 1 year 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).