VB script using  Exec

mkohel used Ask the Experts™
I have the following .vbs file that works on my Windows XP box, but when I try to execute it from a Windows 2000 Server I get an error stating: "the object does support the property or method: Exec"

Here is the relavant part of my script:

Set shell = CreateObject("WScript.Shell")
Set FTP_output = shell.Exec(command)

I need to use Exec instead of Run because I need to capture the StdOut.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I think Shell is an inbuilt function in VB try using someother variable name instead of shell
Yes thats true, i've checked it
Good Luck..
No I think iam wrong sorry


I solved the problem.  I downloaded the newest version of the Windows Scripting Host for Windows 2000 and the problem was solved
Author of the Year 2009

mkohel, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Refund points and save as a 0-pt PAQ.

DanRollins -- EE database cleanup volunteer
Question placed in PAQ

E-E Admin

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial