Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create Shortcut on Desktop In Code (not during install)
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00801769
Message ID:
00803256
Views:
24
That certainly works, thank you. However, the powers that be do not want to include any code that requires the WSH to be installed on workstations as we still support some older Win95/Win98 systems and they do not want to install the WSH if it doesn't exist. They want to use only win32 api code if possible that will always be available on all systems.



>Try This:
>
>FUNCTION CreateDesktopShortcut
>LPARAMETERS cFileName, cLinkName
>
> oShell = CREATEOBJECT('WScript.Shell')
> cDesktop = oShell.SpecialFolders('Desktop')
> oLink = oShell.CreateShortcut(cDesktop + "\" + cLinkName)
> oLink.TargetPath = cFileName
> oLink.Save()
>
>RETURN
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform