Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting network drive
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00199194
Message ID:
00199206
Vues:
26
>I think this is an easy one:
>
>I need to capture the drive letter where the launch executable is stored. The problem is that installations aren't completely standard. Some user have in the Windows Properties starting path the local C:, and others have a network path. The application handles this, but I need to capture the Target drive, and sys(3) doesn't work for this. Is there another sys() function that'll pick up the target?
>
>Looking for something real simple, not API if possible -- this is only very temporary for a usage survey...

JUSTPATH(FULLPATH(SYS(16,0))) if you can get at the source. Just chop off the file name and extension. You could use JUSTDRIVE(), but if there are any UNC references, there may not be a drive letter attached.

If you need to inspect shortcuts, use the WSH Wscript.Shell object's CreateShortcut method to open up the existing shortcut. CreateShortcut returns a shortcut object; the object's TargetPath property will give you the base command line, and the WorkingDirectory property returns the Startup directory for the application.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform