Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to execute a program using shortcut (.LNK) ?
Message
 
 
To
23/04/2008 11:23:46
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01312628
Message ID:
01312630
Views:
15
This message has been marked as the solution to the initial question of the thread.
>Using native VFP command (like RUN) or Windows scripting (like Wscript.Shell) it's possible to execute a program EXE. But someone knows if it's also possible to execute a program from VFP using a shortcut (.LNK) ?

You can do that with WSH Run method by passing full shortcut name including path and extension. The name should be enclosed in double quotes if it has spaces in it. For exanple,
lcShortcut = ["C:\Documents and Settings\sergey\Desktop\VFP9 help.lnk"]
oShell = CREATEOBJECT("WScript.Shell")
oShell.Run(lcShortcut)
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform