I don't know what append to my PC, but from today I have this problem:

if I write a simple vbs script with this 2 line :
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set WSHShell = CreateObject("WScript.Shell")

I get a error on line 2: The specified procedure could not be found

If I invert the order:

Set WSHShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")

I don't have problem !!!

Now all my old script could not be used anymore why I get the error I mention, but Why ?
The only think I remeber I done in tha last day was to install .Net Framework.


Thak's for any help

Re: There is a object order declaration ?! by Michael

Michael
Mon Jan 19 14:10:09 CST 2004

Bragu wrote:
> I don't know what append to my PC, but from today I have this problem:
>
> if I write a simple vbs script with this 2 line :
> Set oFSO = CreateObject("Scripting.FileSystemObject")
> Set WSHShell = CreateObject("WScript.Shell")
>
> I get a error on line 2: The specified procedure could not be found


Similar to the symptoms of this thread...

Google Groups: View Thread "Can't Create Wscript.Shell object"
http://groups.google.com/groups?th=a6ae70754c93f62d



>
> If I invert the order:
>
> Set WSHShell = CreateObject("WScript.Shell")
> Set oFSO = CreateObject("Scripting.FileSystemObject")
>
> I don't have problem !!!
>
> Now all my old script could not be used anymore why I get the error I
> mention, but Why ? The only think I remeber I done in tha last day
> was to install .Net Framework.
>
>
> Thak's for any help

--
Michael Harris
Microsoft.MVP.Scripting

Windows 2000 Scripting Guide
Microsoft® Windows®2000 Scripting Guide
http://www.microsoft.com/technet/scriptcenter/scrguide/sagsas_overview.asp

TechNet Script Center Sample Scripts
http://www.microsoft.com/downloads/release.asp?ReleaseID=38942

WSH 5.6 documentation download
http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en