Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running a Desktop Shortcut from VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00551804
Message ID:
00552121
Vues:
27
>>>>>How can I Run a Desktop Shortcut from VFP?
>>>>>
>>>>>Thanks in advance,
>>>>>
>>>>Enmanuel,
>>>>
>>>>If you're asking how to create a desktop shortcut, or retrieve the names of the special folders such as the Desktop, Start Menu, etc., there are two resources you should consider.
>>>>
>>>>First is the Windows Script Host. The WScript.Shell object exposes a number of methods to deal with this. For more information, look at last October's issue of the VFUG newsletter, which is available on-line at www.vfug.org. This is the second in a series of articles written by Ed Rauh and myself dealing with the WSH.
>>>>
>>>>Second, if the WSH isn't an option, my LNKFILES.DLL available in the UT download section can do things like retrieving the desktop folder, creating shortcuts, etc.
>>>
>>>Thanks for your reply George. Actually I was looking for a simple way to run a shortcut as if I double-click it. Hilmar sent me the "START" command wich I didn't knew of and it worked. Anyway I'll take a look at the Windows Script Host, you never know when you may need it.
>>>
>>>Have a nice day,
>>>
>>>
>>Enmanuel,
>>
>>Actually, the WSH could be of interest. First, it will retrieve the special folder names for you (so you don't have to hardcode them). Second, the WScript.Shell has a Run method that can be used to launch the shortcut (or any file with an association) directly.
>
>Hello again George. You have made my day. I've found the WSH the perfect tool for my problem, basicly the "run and wait for program termination" part. I needed the program to stop until the called application terminate and the RUN method of the WSH allow me to do that.
>
>Thanks again,
>
Enmanuel,

You're welcome. Glad I could help.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform