Discussion Locked

Scripting

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Ok, this is driving me insane! I have a web page containing the following script:

Just trying to run a filewhen my page is accessed. Works completely fine until I access this page via IIS, then I get the following message:

"ActiveX component can't create object: Wscript.shell"

Doesn anyone have a clue what this is all about, something on IIS I assume? Of course Microsofts site was useless. Any help is greatly appreciated.

Thanks

7 replies

by beermonster

Hi,
Check that you have the latest version of windows scripting host, it's available at the microsoft site...

by alterego2

If you are accessing it via a client browser then you will need to change :-

-CreateObject to
-Server.CreateObject as you are creating the object on the server via as IIS request page.

You will need to ensure that a version of WSH is instaled on the IIS Server.

by steven_v_brown

If this is a server side script follow the previous answer ( change CreateObject to
-Server.CreateObject )

If this is a client side script a few client side settings must be confirmed. (I have this prob @ work due to Network services NT/2K GPO lock downs)

Allow ActiveX (Safe & Unsafe) modules to be run.
Register WScript.Shell as a safe ActiveX object.

Good luck

This discussion is closed to new replies.