right, if anyone can tell me how to do this, i'll be amazed, because i can't find anything about it anywhere...
how do i create a shortcut file from my program
it's got to be fairly simple, surely..?!?!?!
Printable View
right, if anyone can tell me how to do this, i'll be amazed, because i can't find anything about it anywhere...
how do i create a shortcut file from my program
it's got to be fairly simple, surely..?!?!?!
Code:Declare Function fCreateShellLink Lib "STKIT432.DLL" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
'Usage:
fCreateShellLink "C:\windows\Desktop", "Link to my program", "C:\Path\Program.exe", ""
I've tried to use an absolute path as the first parameter to fCreateShellLink, but it just doesn't work. The only type of parameter that does work is one that is relative to the Startup directory. Do I need VB6 to make this work?
Quote:
Originally posted by kedaman
Code:Declare Function fCreateShellLink Lib "STKIT432.DLL" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
'Usage:
fCreateShellLink "C:\windows\Desktop", "Link to my program", "C:\Path\Program.exe", ""
Here is the API function to make it work in VB5:
Code: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
That's odd because it works fine for me, i have vb5. I guess you would need to have STKIT432.DLL