Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a Desktop Link
Message
From
31/07/2000 10:33:41
Jomy John
Vision Info Solution Pvt. Ltd.
New Delhi, India
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00394305
Message ID:
00398789
Views:
12
Try this function

function Dsk_fldr(lcFileName,lcFolderName,lcIconName)

** lcFileName - File name of exe
** lcFolderName - - Path of exe
** lcIconName - icon of exe

local loShell, lcDesktopFolder, loShortcut, lcLinkFileName
m.loShell = createobject('wscript.shell')
if type(m.loShell) <> 'O'
m.lcDesktopFolder = m.loShell.SpecialFolders('Desktop')
m.lcLinkFileName = m.lcDesktopFolder + '\' + lcFolderName
m.loshortcut = m.loShell.CreateShortcut(m.lcLinkFileName)
m.loShortCut.TargetPath = lcFileName
if !isnull(lcIconName) .and. !empty(lcIconName)
m.loShortCut.IconLocation = lcIconName
endif
m.loShortcut.Save()
endif
retu
endfunc

Jomy John
jomyjohn@hotmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform