
WScript don't run under Win95 ???
A couple more points:
A) You'll also want to regsvr32 wshom.ocx, as that's the file that actually
has WScript.Shell in it. If Mark's suggestion is the problem, you may have
many files that haven't been registered - reinstalling Script 5.1 may be in
order.
B) You are trying to run a vbe file from the command line. That doesn't work
in Win9x - you must explicitly call cscript or wscript to execute a script
file. On NT based systems, you can run script files without explicitly
calling the host, but not on 9x.
C) You also mention you are doing this from a web page. If Mark's suggestion
doesn't help, you might want to look at the security settings. Perhaps the
Win98 box has security set to low, and the Win95 box is set to normal or
high. From a security viewpoint, the shell.Run command is one of your more
dangerous commands (I'd say it's the most dangerous, in fact), hence the
shell object is not creatable from IE under default security.
Mike Whalen
Windows Script Dev
Win 95 can have trouble with registration of COM components. My first try
would be to go to start, Run, and type REGSVR32 SCROBJ.DLL <enter> You
will get a success report IF win 95 is NOT out of space in that part of the
registry where com is registered. (64 K limit in win 95)
IF this is in fact what is happening, this link will help cleanup old
entries.
"Failure Writing to the System Registry" Error Message When Running Setup
Program Created Using Application Setup Wizard
http://support.microsoft.com/support/kb/articles/q247/4/97.asp
--
Mark L. Ferguson Please reply in newsgroup
marfer's notes for OE 5 >
http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm
Quote:
> I have created a script that I call from a webpage using:
> <!--
> set Shell = Createobject("Wscript.Shell")
> Shell.Run "c:\windows\cacp.vbe"
> -->
> The above line works under Windows 98 but not under 95.
> Under 95 I get a message saying ;
> Error: Active X component can't create object "Wscript.Shell"
> I have loaded WSH 2.0 and Script Encoding. Any Ideas???
> BB