Pop this in the code (this is for VB5 - it may be different for VB6)

Private Declare Function fCreateShellLink Lib "VB5STKIT.DLL" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpStrLinkArgs As String) As Long

Sub CreateShortcut(Location As String, linkname As String, linkpath As String, linkargs As String)
'location = path from [programs folder] on start menu. eg, ..\..\desktop = desktop
Dim lngResult As Long
lngResult = fCreateShellLink(Location, linkname, linkpath, linkargs)
End Sub

then call it by using

CreateShortCut [location],[name],[path],[arguments]

where [location] is the location you want to place the shortcut - note that the root of this is always the PROGRAMS menu on the START menu. Therefore, if you want to create the link on the desktop you must use "..\..\Desktop" (for Win'95) etc

[name] is the name you want to display on the icon,
[path] is the path to the file you are building a shortcut for
[arguments] are any arguments you want to put on the shortcut.



------------------
Mark "Buzby" Beeton
VB Developer
[email protected]