Wscript.CreateObject error on ASP page

M

MacKenzie

The statement in an asp page:

dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")

now gives this error:
VB err= 424,Object required

If I use setobjShell=Server.CreateObject("WScript.Shell"), I get the error
VB err= 5,Invalid procedure call or argument


I believe it stopped working in July 2004 after a security update. I have
re-registered the appropriate dlls and ocxs.

Does anyone have an idea? I am trying to use this object so that I can
execute a batch file that was created earlier in the program.

Thanks
 
R

Ray Costanzo [MVP]

Forget the WSCript.CreateObject code. That's not for ASP. For your other
code where you have Server.CreateObject, can you copy and paste the code
from the exact file giving you the problem and post it here?

Ray at work
 
M

MacKenzie

Yes, the code is:
dim objShell
Set objShell = server.CreateObject("WScript.Shell")

and I get the error 5,Invalid procedure call or argument.

Thanks!
 
R

Ray Costanzo [MVP]

Well, yeah, there's nothing wrong with that. Perhaps some antivirus
software is blocking the creation of this object? If you put this in a .vbs
file:

dim objShell
Set objShell = CreateObject("WScript.Shell")

and run it while logged onto the machine with administrative rights, what
happens?

Ray at work
 
R

Ray Costanzo [MVP]

I think that it ~could~ be a permissions problem, although IUSR_ should be
permitted to create a WScript.Shell object in a default setup. Has anyone
made any dcomcnfg changes lately or anything?

Ray at work
 
M

MacKenzie

Hello-
Well, thanks for the ideas, but nothing has worked. Access to this web site
is not through IUSR_, because I also access a soucesafe database on our
network and the share is only available to network users. When I log in as
me (an administrator), I can access the VSS, but the wscript does not work.
Running the script manually works, however. Is there another way I can
execute a batch file from within this web site?

Nancy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top