WriteShortcut - Lnk for Cobra
Function WriteShortcut(lnk :^lnks) : Boolean
lnk: A shortcut created with CreateShortcut
Writes a shortcut to disk. Returns TRUE on success.
Example:
Program
Uses
lnk
Begin
lnk = CreateShortcut("My Shortcut", LNK_VOLUME_LOCAL, LNK_VOLUME_TYPE_FIXED)
lnk.lDescription = "Here's my test shortcut!!!"
lnk.lTargetPath = CurrentDir + "\testlnk.exe"
lnk.lRelativePath = ".\testlnk.exe"
lnk.lWorkingDir = CurrentDir
lnk.lCustomIcon = CurrentDir + "\test.ico"
If WriteShortcut(lnk) = FALSE then MessageBox("Couldn't create shortcut")
Free(lnk)
End
Uses
lnk
Begin
lnk = CreateShortcut("My Shortcut", LNK_VOLUME_LOCAL, LNK_VOLUME_TYPE_FIXED)
lnk.lDescription = "Here's my test shortcut!!!"
lnk.lTargetPath = CurrentDir + "\testlnk.exe"
lnk.lRelativePath = ".\testlnk.exe"
lnk.lWorkingDir = CurrentDir
lnk.lCustomIcon = CurrentDir + "\test.ico"
If WriteShortcut(lnk) = FALSE then MessageBox("Couldn't create shortcut")
Free(lnk)
End
Stay Subscribed
RSS feed or get updates by e-mail.
, subscribe to theYou can also contact me directly - I make an effort to reply to every e-mail.