CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 1999
    Posts
    4

    How to Create Shortcut on Windows NT

    Hi,

    I need help in writing a program which will create a short for any given program.
    i.e if my program is c:\mypath\bin\test.exe, I need a program which will create
    a shortcut on my desktop by name ShortCut which is pointing to test.exe.

    Please help.


    Ramix


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: How to Create Shortcut on Windows NT

    you can use a function in vb6stkit.dll
    (stolen from common.bas

    public Declare Function OSfCreateShellLink Lib "vb6stkit.dll" Alias "fCreateShellLink" (byval lpstrFolderName as string, byval lpstrLinkName as string, byval lpstrLinkPath as string, byval lpstrLinkArguments as string, byval fPrivate as Long, byval sParent as string) as Long




    check the source for setup1.bas in the source directory of setup1. It has a CreateShellLink Sub that you can adapt to your needs.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured