M
mto32
I'm trying to add a simple 'server side' script to an ASP page. If I run it
with the server logged in, it works fine (a DOS window flashes on the
server). If the server isn't logged in, it doesn't work. I've played with
different methods (wscript.shell & ASPExec), but neither works. Using the
wscript.shell method, I see Event ID 26 (application popup: cmd.exe
Application Error: the application failed to initialize properly). My
IUSR_SERVER account is in the 'Domain Admins' group. See a basic 'sample'
code below. Thanks in advance for any assistance.
set WshShell = Server.CreateObject("Wscript.Shell")
dim ShellCommand
ShellCommand = "cmd /c dir c:\ > d:\inetpub\wwwroot\adtools\TEST.txt"
WshShell.run ShellCommand
set WshShell = nothing
================= or =====================
Set ObjExecutor = Server.CreateObject("ASPExec.Execute")
ObjExecutor.Application = "cmd.exe"
ObjExecutor.Parameters = "/c dir c:\ > d:\inetpub\wwwroot\adtools\TEST.txt"
ObjExecutor.ShowWindow = False
x=ObjExecutor.ExecuteWinApp
with the server logged in, it works fine (a DOS window flashes on the
server). If the server isn't logged in, it doesn't work. I've played with
different methods (wscript.shell & ASPExec), but neither works. Using the
wscript.shell method, I see Event ID 26 (application popup: cmd.exe
Application Error: the application failed to initialize properly). My
IUSR_SERVER account is in the 'Domain Admins' group. See a basic 'sample'
code below. Thanks in advance for any assistance.
set WshShell = Server.CreateObject("Wscript.Shell")
dim ShellCommand
ShellCommand = "cmd /c dir c:\ > d:\inetpub\wwwroot\adtools\TEST.txt"
WshShell.run ShellCommand
set WshShell = nothing
================= or =====================
Set ObjExecutor = Server.CreateObject("ASPExec.Execute")
ObjExecutor.Application = "cmd.exe"
ObjExecutor.Parameters = "/c dir c:\ > d:\inetpub\wwwroot\adtools\TEST.txt"
ObjExecutor.ShowWindow = False
x=ObjExecutor.ExecuteWinApp