Community discussion forum

Create a shortcut

This is a comment thread discussing Create a shortcut
  • 10 years ago

    This thread is for discussions of Create a shortcut.

  • 7 years ago
    I used the code for "Create a shortcut"  given on http://www.vbweb.co.uk/show/245/ . I made it DLL so that i call the dll in my ASP page. But when i'm calling the DLL  in ASP page , i'm getting the following error
    ----------------ERROR--------------------------------
    Error Type:
    Microsoft VBScript runtime (0x800A000D)
    Type mismatch: 'CreateShortcut'
    /index1.asp, line 25

    ------------------------------------------------

    I'm using the following code in ASP

    strpath="http://server2000/index.asp"
    strname="index"
    set desk=server.CreateObject("Desktop.Shortcut")

    CreateShortcut=desk.CreateShortcut(strpath,strname,CSIDL_DOCUMENTS)


    where "Desktop" is name of the project and "Shortcut" is classname

    Pls if anybody has the clue abt the error i'm facing then pls help me out..

    Thanx
    Bharat
  • 6 years ago

    how to get target info (name, location ...) of a shorcut file?

  • 4 years ago
    I need to be able to change the "Start In" field of a shortcut with VBA so that I can automatically create shortcuts for users using AccessRT.  Can anyone suggest a way to do this?  By the way, great code, had to play with it a little to get it to work with Access 97, but it works great!

    Update:  Also, I noticed that you cannot put complicated strings in as the target path.  For instance, I would want to change the target to the following:

    "C:\Program Files\AccessRT\Office\msaccess.exe" "\\NetworkDrive\SomeDir\SomeAccessFile.mdb" /runtime
  • 1 year ago
    Hi James... I have tried your posted code to produce a shortcut, as I’m new to Visual Studio, sadly I didn’t understand the short description… and just copying and pasting the longer ‘complicated’ code threw up so many errors I deleted it all again. My guess is that neither of these solutions are directly applicable to Visual Studio. These days I only write programs for my own amusement and usually only when I need a utility of some sort. In my case most of the enjoyment of programming is working out how to achieve an object. Currently I would like to be able to create shortcuts for selected files in a folder, since a right click on a file in Windows Explorer can produce a pop up list with an option to create a shortcut, I have to assume there’s an inbuilt facility that I ought to be able to access. I would love to know which facility to use and what parameters are needed and possibly some hint as to how to call it; rather than code for a specific job. This information would I think, then useful to whatever language the reader is using.

Post a reply

Enter your message below

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

We'd love to hear what you think! Submit ideas or give us feedback