Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating windows Shortcuts from VFP
Message
De
26/10/1999 17:21:56
 
 
À
26/10/1999 16:44:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00281849
Message ID:
00281881
Vues:
12
>Hello All,
>
>I am looking into creating shortcuts to applications directly
>from VFP. I am sure somebody has already done it and would appreciate
>it very much if any of you could point me in the right direction.
>

You have several options. George Tasker's LNKFILES.DLL is available for download here on UT, and it can create and maintain shortcuts fairly easily. it can be used by installing George's .DLL on the systems maintaining the shortcuts.

My preferred method is to use the Windows Scripting Host's Wscript.Shell CreateShortcut method. The WSH has a great deal of functionality beyond just shortcuts, but it does have to be installed on each system using it to create or maintain the shortcuts. The WSH is built into Win98 and Win2K, and is installed as a part of IE4 and later automatically. It can be added to Win95 (with at least Win95 SP1 installed) or WinNT 4.0 (requires SP3 or later) by running the self-installing executable avaialble from msdn.microsoft.com/scripting, and is redistributable with your applications.

Realize that in order for a shortcut to be usable by a target system, it has to be able to reference the location of the executable and the targewt directory which it will run from. If this is a network environm,ent, a normal shortcut is pretty useless unless the executable and target directories are reachable from each system. This means that unless you have completely uniform mapping of network drives across all recipients of the email, you'd best use UNCs to reference non-local directories and files, and all target systems will need the necessary read and write privileges in the directories.

If you need to run VFP apps across a netowrk, make certain to install the VFP runtimes locally on each target system. The VFP runtime requires entries in the local registry, and trying to load the runtime across a network connection (even a LAN) is frustrating - there's nothing quite like waiting on 4MB of executable and DLL to load at 28.8K...and that's just to start the runtime.

You can also create shortcurts to URLs with these tools; you can make use of URLs more easily, but you can't easily run an application through a URL without creating a web-base app in the first place. Embedding URLs in an email mail obviate the need to send shortcuts as attachments (most mail programs will run an embvedded URL if you click on it from a mailer.)

>The ultimate goal is to include these shortcuts into emails (that
>part I can do).
>
>Thanks in advance.
>
>Pascal
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform