Click to See Complete Forum and Search --> : NET SEND on XIN XP SP2


shiryu_libra
04-13-2007, 11:25 PM
hello masters...

woundering if can i get some help from all...

i'm trying to use this script, on a XP pro SP2 with IIS, when i try to run the script, the error message...

"Permission denied"

<%
on error resume next
Msg = TRIM(Request.Form("Msg"))
NamUsr = TRIM(Request.Form("NamUsr"))
Computer = Request.ServerVariables("REMOTE_ADDR")

if Msg <> "" AND NamUsr <> "" THEN
'Sending the message
Set server_shell = Server.CreateObject("wscript.shell")
server_shell.Run "%comspec% /c net send " & NamUsr & " [FROM:" & Computer & "] " & Msg
ELSE
'Displaying the form %>
<FORM NAME="Vorm" METHOD="Post">
To: <INPUT TYPE="text" NAME="NamUsr" SIZE="20"><BR>
Message: <INPUT TYPE="text" NAME="Msg" SIZE="40"><BR>
<INPUT TYPE="submit" VALUE="Send Message">
</FORM>
<%END IF%>

the problem is the RED line.... any coments??

i'm trying tu uses with my IUSR_Machine

shiryu_libra
04-14-2007, 12:55 AM
anyone?? is it about security o restrictions on the users accounts???

russell
04-14-2007, 02:54 AM
what happens if u change service account to local admin windows user?

shiryu_libra
04-15-2007, 03:10 PM
the IUSR_PC have total control over that specific folder, inside the wwwroot...
:confused:man... how can i switch them??... never do that?

russell
04-17-2007, 11:15 AM
in the iis mmc, change service account to some local admin account (yours perhaps for testing at least) or IUSR_PC needs to be added to local administrators in the users panel of the computer management applet. shell.run is not in wwwroot, so IUSR_PC doesnt have permission.

shiryu_libra
04-19-2007, 05:33 PM
i try switching them, but, no it doesn't work at all... any other suggestion???
if i go to CMD console, and i send a message directly, work fine..


c:\net send 192.16.1.100 HELLO

and it do it....
but wend i try to do it with te ASP page... this is what i get


"Permission denied"

server_shell.Run "%comspec% /c net send " & NamUsr & " [FROM:" & Computer & "] " & Msg


how can i make it work?????