Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Difference between wcript.shell and shell.application?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01291861
Message ID:
01291895
Vues:
8
See How do I get the path of special folders from Windows FAQ #16022 for Shell.Application availability.

The WSH is included in Windows 2000 and later but it could be removed by some companies because they condiser it a security risk.

>We have code in our system in two places. Both sets of code are trying to determine the correct path to My Documents. Both seem to work.
>
>Code Set 1:
>
>oShell = createobject("wscript.shell")
>m.cPath = oShell.SpecialFolders("MYDOCUMENTS")
>
>
>Code Set 2:
>
>oShell = createobject("Shell.Application")
>oFolder = oShell.NameSpace(0x5)
>m.cPath = oFolder.Self.Path
>
>
>Aside from the obvious extra line of code in Code Set 2, is there a "better" choice between the two. What is the difference between wscript.shell and shell.application. Will both methods work on a Win98 machine?
>
>Thanks for your help.
>
>Rodd
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform