Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Difference between wcript.shell and shell.application?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Difference between wcript.shell and shell.application?
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01291861
Message ID:
01291861
Views:
123
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
Next
Reply
Map
View

Click here to load this message in the networking platform