Click to See Complete Forum and Search --> : How to Create Shortcut on Windows NT


ramix00
October 11th, 1999, 04:38 PM
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

Lothar Haensler
October 12th, 1999, 02:42 AM
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.