creating a shortcut - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

creating a shortcut

MFHMFH Posts: 56Member
I need to create a shortcut to a file whose path is determinated through the position of the program. I also need to give an icon to this shortcut.
What should I do?

Thanks for the help
There are 10 kind of people: those who understand binary code and those who don't understand it.

Comments

  • BitByBit_ThorBitByBit_Thor Posts: 2,444Member
    : I need to create a shortcut to a file whose path is determinated through the position of the program. I also need to give an icon to this shortcut.
    : What should I do?
    :
    : Thanks for the help
    : There are 10 kind of people: those who understand binary code and those who don't understand it.
    :

    I'm affraid you're going to have to manually create the binary file. Meaning finding the format of a shortcut and programming it.
    When you do this, you're going to be storing a string into the file. Make sure you check whether this string is Unicode (2 bytes per char) or ANSI (1 byte). I suspect the second, and VB uses the first.

    As for the current path of the executable -> App.Path

    Good luck... for the format, Google's your friend.

    Best Regards,
    Richard

  • MFHMFH Posts: 56Member
    [b][red]This message was edited by MFH at 2007-2-2 14:24:41[/red][/b][hr]
    : : I need to create a shortcut to a file whose path is determinated through the position of the program. I also need to give an icon to this shortcut.
    : : What should I do?
    : :
    : : Thanks for the help
    : : There are 10 kind of people: those who understand binary code and those who don't understand it.
    : :
    :
    : I'm affraid you're going to have to manually create the binary file. Meaning finding the format of a shortcut and programming it.
    : When you do this, you're going to be storing a string into the file. Make sure you check whether this string is Unicode (2 bytes per char) or ANSI (1 byte). I suspect the second, and VB uses the first.
    :
    : As for the current path of the executable -> App.Path
    :
    : Good luck... for the format, Google's your friend.
    :
    : Best Regards,
    : Richard
    :
    :
    Are you sure there is no way to create it? I thought some installation programs can do it

    edit: I think I found something here: http://www.windowsdevcenter.com/pub/a/windows/2004/04/13/VB_Shortcuts.html

    However thanks for the help
  • BitByBit_ThorBitByBit_Thor Posts: 2,444Member
    : Are you sure there is no way to create it? I thought some installation programs can do it
    :
    : edit: I think I found something here: http://www.windowsdevcenter.com/pub/a/windows/2004/04/13/VB_Shortcuts.html
    :
    : However thanks for the help
    :

    Yeah I was affraid you mind find that.

    It's the Windows Scripting Host. Fairly unpopular since almost all VB viri work because of that component. If you want it to be any bit portable, don't use it.
    Just program it yourself.

    Best Regards,
    Richard

Sign In or Register to comment.