Create shortcut

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dmurthy
    New Member
    • Oct 2008
    • 1

    Create shortcut

    Need a coding to create a shorcut on desktop.(Either in VB or in DOS) For an existing executable file that is existing in one of the drives.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    why you need to write code for such things ,simply right click and create the shortcut.

    Comment

    • joedeene
      Contributor
      • Jul 2008
      • 579

      #3
      Why not copy it using the FileCopy code?

      joedeene

      Comment

      • jg007
        Contributor
        • Mar 2008
        • 283

        #4
        last time i needed to do this I used windows scripting language

        see how far you can get with the start of the code below

        I have not posted the full code and there is more to add but is better if you try yourself (also I have been told off before for posting the full code :) but if you have problems just post what you have so far or try a google for 'wshshortcut'

        you will also need to add ' Interop.IWshRun timeLibrary ' to your references

        Code:
        Dim shortcut As WshShortcut
        
        testshell = New WshShell
        
        shortcut = testshell.CreateShortcut(shortcutname)

        Comment

        Working...