Creating a Shortcut

I have to create a shortcut to MSACCESS.EXE with the various paameters you have to pass. I found some code on the Internet to do the job, but it doesn't work on my machine. xp issue?

As far as I can tell the first problem is that it tries to use an api call to add MSACCESS.EXE (the full path) to the "Recent" folder on my computer. The call returns with a return code of greater than 0 which indicates success, but the code can't seem to find the file in the recent folder--as if it didn't put the link there. I.e., when I use Win Explorer to look in the folder, the file is not listed. Nor will a Dir([Recent folder path]MSACCESS.EXE.lnk), it returns nothing.

Either what's wrong here, or, is there another way to create a shortcut in VB6?

Thanks,

James

Comments

  • : I have to create a shortcut to MSACCESS.EXE with the various paameters you have to pass. I found some code on the Internet to do the job, but it doesn't work on my machine. xp issue?
    :
    : As far as I can tell the first problem is that it tries to use an api call to add MSACCESS.EXE (the full path) to the "Recent" folder on my computer. The call returns with a return code of greater than 0 which indicates success, but the code can't seem to find the file in the recent folder--as if it didn't put the link there. I.e., when I use Win Explorer to look in the folder, the file is not listed. Nor will a Dir([Recent folder path]MSACCESS.EXE.lnk), it returns nothing.
    :
    : Either what's wrong here, or, is there another way to create a shortcut in VB6?
    :
    : Thanks,
    :
    : James
    :

    Shortcuts has been as far as I know a terrible thing to do in Windows. Such an essential part of the Windows Shell and they left it out of all API's. Luckily, there are C structures defined in the Windows Headers. You could always try and get them. You could also check out the MSDN Library. It'll propably contain some information on how to create a shortcut (perhaps even a sample code!)

    Greets...
    Richard

Sign In or Register to comment.

Howdy, Stranger!

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

Categories

In this Discussion