server.createObject("wscript.shell") ... wShell.run ... stopped working...

B

Bill

I used to be able to run the following ASP code on our corp machine (W2K
Server Edition and IIS-5)
and successfully send a net-msg to anyone on our intranet.

Last week it stopped working... and I'm not sure what changed.
(I had applied ALL the W2K update patches... but... I'm not sure if the
problem started before or after that.)

Did any recent W2K patches change the way createObject, wScript.shell, or
"NET SEND" works?
(All my other ASP files continue to work fine.)

1> Dim wShell
2> response.write "Message Sent"
3> set wShell = server.createObject("wscript.shell")
4> wShell.run "Net SEND x.x.x.x test" ' (Insert the IP address
here)
5> set wShell = nothing

I can type "NET SEND" from the server "by hand" from a DOS prompt... and the
msg goes out fine.

When I try to use that same code to run NotePad.exe or Calc.exe... they
never open... but the Task Manager "process list" shows they are running.

Any ideas?
 
B

Bill

When I run NET SEND from my asp code... the output file contains:
An error occurred while sending a message to x.x.x.x
(And I do NOT get the pop-up.)

When I run the same NET SEND myself... from a DOS prompt on the server...
the output file contains:
The message was successfully sent to x.x.x.x
(And I do get the pop-up.)

When I run DIR from my asp code... the output file contains the correct
directory listing.

Hmmmm. Very interesting.

Does my ASP code work on your machine?

-Bill


Ray at said:
Try running the net send with cmd.exe and piping the output, i.e.

wShell.Run "cmd.exe /c net send x.x.x.x
test>C:\PathOnServerThatIUSRhasWritePermissionsTo\netsend.txt"

Then look at that file. It will either say "The message was successfully
sent to x.x.x.x." or something else indicating something, hopefully.

Ray at home

--
Will trade ASP help for SQL Server help


selected
in
the IIS manager...

I've looked... but I'm not sure what I should set it to.
(I've never changed it... my ASP code just stopped working 1 day. It worked
100% fine for many months.)

ASP...

Would the fact that they *ARE* (at least) being executed...
at least tell me that I have my permissions set correctly?
(Each time I run my asp code... another copy of Calc.exe appears in the
process list.
Would that be happening if the user didn't have privileges to execute the
ASP... or run executable?)

Does anyone know if any of the newest 20 "patches" to W2K changed some
"permission stuff"?

I DO appreciate your help with this.

Thanks
selected
in wScript.shell,
or
 
R

Ray at

Are you sure that x.x.x.x is correct in your ASP page? Typically you'll get
that "an error occurred..." when the recipient cannot be resolved or does
not have the messenger service running. Your ASP code works fine on my W2K
server.

But I think that you should listen to Curt who has suggested a bunch of
times that it's probably a permissions thing. I don't know about your
setup, but on my W2K server, everyone has read/execute permissions, which is
fine, but on my XP machine, IUSR has explicit denied rights, and I don't
believe I set it that way.

Ray at home
 
B

Bill

Are you sure that x.x.x.x is correct in your ASP page?

The same IP address works when I type it in myself at a DOS prompt on the
server.
The same IP address does NOT work from the ASP code.
But I think that you should listen to Curt who has suggested a bunch of
times that it's probably a permissions thing.

I'll play with it some more.

Could it still be "wrong permission setting" when:
... the NET SEND executable *IS* definitely being executed. (And giving
its error msg.)
... NotePad.exe and Calc.exe *ARE* being executed. (And appearing in
the process list as "running".)
... "Dir >c:\tmp\dir.txt" works 100% fine. (And lists the files.)

Wouldn't *NONE* of that work... if it was a "you don't have permission"
thing?
(Instead... all of those work.)

Aren't computers fun?

-Bill
 

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,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top