I need to execute a file on my server. I've tried to use this code:
<%
set wshell = server.createobject("wscri
pt.shell")
set proc=wshell.Exec("program.
exe")
'let the action finish before attempting to do anything with it
do while proc.status = 0
wscript.sleep 100 'or 250, 500, try several values
loop
dim s : s = ""
s = s & "<BR>a=" & proc.StdOut.ReadAll()
s = s & "<BR>b=" & proc.StdErr.ReadAll()
response.write(s)
set wshell = nothing
%>
But tells me somethjing like this:
Property "Exec" not accepted.
Then I tried this one:
' Dim wshell, intReturn, Cadena
set wshell = server.createobject("wscri
pt.shell")
Cadena= "Date"
' wshell.run (Cadena)
' Response.Write( intReturn )
' set wshell = nothing
But gives me an error in the line of the run.
User IUSR_Machine has permissions from IIS...What the hell am I donig wrong!!...HELP!!!.
Good reward is waiting and glad to give it!.
Start Free Trial