I have the following code for creating a shortcut
VB 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 dim result as long Result = fCreateShellLink("..\..\Desktop", ShortCutName, App.Path & "\exename.exe", (properties))
For the desktop shortcut path which is "..\..\Desktop" it works fine on my computer, but when I try to run the program on another system it doesnt put a shortcut on the desktop. Everything else works but the shortcut on the desktop so I tried to use an exact path such as "C:\Docume~1\Administrator\Desktop\" and then it doesnt even work on my computer. Anyone have any idea how to fix this so that it works on other computers and I can be exact as to where the shortcut is put?
Thanks,
jd




Reply With Quote