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

Ask a Question related to ASP, Design and Development.

  1. #1

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

    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?



    Bill Guest

  2. Similar Questions and Discussions

    1. Server.CreateObject("Access.Application")
      hi i have a big problem. i have an asp file with the following source code.... ****** Set r_ = Server.CreateObject ("Access.Application.10") ...
    2. Server.CreateObject("MSWC.Tools") fails in Windows 2003 server?
      hello all, I hope you all are fine and doing well. I'm finding this error when i do Server.CreateObject("MSWC.Tools") in ASP using interdev. I...
    3. server.createobject("wscript.shell")
      How about: set wshell = server.createobject("wscript.shell") wshell.run "c:\file.bat " & x set wshell = nothing And then in your batch, use...
    4. Error:: Activex componet can not create object:"WScript.Shell"
      I am trying to use the shell object to send keys to the explorer browser to run the send page funcion. I am receiving the above error only when I...
    5. Server.CreateObject("ADODB.Stream")
      Does anyone know an alternative to this? I am using a ChiliSoft server and this isn't supported. TIA, Andrew * * * Sent via DevBuilder...
  3. #2

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

    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 <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:Olqphy%23UDHA.2368@TK2MSFTNGP09.phx.gbl...
    > 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
    >
    >
    > " Bill" <BillGostin_RE_MOVE@eMail.com> wrote in message
    > news:e59Dns%23UDHA.2156@TK2MSFTNGP11.phx.gbl...
    > > > it's based on the permissions of the IIS user account that you
    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.)
    > >
    > > > Oh... and GUI apps (like notepad/calc/etc) will almost NEVER work from
    > > 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
    > >
    > >
    > >
    > > "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    > > news:ukW9nN9UDHA.2044@TK2MSFTNGP11.phx.gbl...
    > > > it's based on the permissions of the IIS user account that you
    selected
    > in
    > > > the IIS manager...
    > > > Check there
    > > >
    > > > --
    > > > ----------------------------------------------------------
    > > > Curt Christianson (Software_AT_Darkfalz.Com)
    > > > Owner/Lead Designer, DF-Software
    > > > [url]http://www.Darkfalz.com[/url]
    > > > ---------------------------------------------------------
    > > > ..Offering free scripts & code snippits for everyone...
    > > > ---------------------------------------------------------
    > > >
    > > > " Bill" <BillGostin_RE_MOVE@eMail.com> wrote in message
    > > > news:OTCwDn8UDHA.1816@TK2MSFTNGP09.phx.gbl...
    > > > > 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?
    > >
    > >
    >
    >

    Bill Guest

  4. #3

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

    permissions?
    Change the permissions of the user that IIS is running under

    --
    ----------------------------------------------------------
    Curt Christianson (Software_AT_Darkfalz.Com)
    Owner/Lead Designer, DF-Software
    [url]http://www.Darkfalz.com[/url]
    ---------------------------------------------------------
    ...Offering free scripts & code snippits for everyone...
    ---------------------------------------------------------

    " Bill" <BillGostin_RE_MOVE@eMail.com> wrote in message
    news:eetyssEVDHA.656@tk2msftngp13.phx.gbl...
    > 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 <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > news:Olqphy%23UDHA.2368@TK2MSFTNGP09.phx.gbl...
    > > 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
    > >
    > >
    > > " Bill" <BillGostin_RE_MOVE@eMail.com> wrote in message
    > > news:e59Dns%23UDHA.2156@TK2MSFTNGP11.phx.gbl...
    > > > > it's based on the permissions of the IIS user account that you
    > 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.)
    > > >
    > > > > Oh... and GUI apps (like notepad/calc/etc) will almost NEVER work
    from
    > > > 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
    > > >
    > > >
    > > >
    > > > "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    > > > news:ukW9nN9UDHA.2044@TK2MSFTNGP11.phx.gbl...
    > > > > it's based on the permissions of the IIS user account that you
    > selected
    > > in
    > > > > the IIS manager...
    > > > > Check there
    > > > >
    > > > > --
    > > > > ----------------------------------------------------------
    > > > > Curt Christianson (Software_AT_Darkfalz.Com)
    > > > > Owner/Lead Designer, DF-Software
    > > > > [url]http://www.Darkfalz.com[/url]
    > > > > ---------------------------------------------------------
    > > > > ..Offering free scripts & code snippits for everyone...
    > > > > ---------------------------------------------------------
    > > > >
    > > > > " Bill" <BillGostin_RE_MOVE@eMail.com> wrote in message
    > > > > news:OTCwDn8UDHA.1816@TK2MSFTNGP09.phx.gbl...
    > > > > > 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?
    > > >
    > > >
    > >
    > >
    >
    >

    Curt_C [MVP] Guest

  5. #4

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

    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

    --
    Will trade ASP help for SQL Server help


    " Bill" <BillGostin_RE_MOVE@eMail.com> wrote in message
    news:eetyssEVDHA.656@tk2msftngp13.phx.gbl...
    > 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 Guest

  6. #5

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

    > 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

    > 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
    >
    > --
    > Will trade ASP help for SQL Server help
    >
    >
    > " Bill" <BillGostin_RE_MOVE@eMail.com> wrote in message
    > news:eetyssEVDHA.656@tk2msftngp13.phx.gbl...
    > > 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
    > >
    >
    >

    Bill Guest

  7. #6

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

    On Sun, 27 Jul 2003 23:40:28 -0400, "Ray at <%=sLocation%>"
    <myfirstname at lane34 dot com> wrote:
    >Computers are very fun. I'd be curious to know what the rest of the net
    >send result was in the net send x.x.x.x test>C:\file.txt. Is it possible
    >your server's behind a firewall with port 135 (I think) blocked or
    >something?
    >
    >Ray at home
    If the net send port was blocked, he wouldn't be able to net send from
    a command prompt.

    I would try turning "Anonymous Access" OFF and integrated windows
    security ON on the security tab of the page in question and see if
    running the "net send" as YOU instead of IUSR_machine works.
    Daniel Bush Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139