D
Daniel Di Vita
I am trying to run a command line from an ASP page. I am using windows 2003
with IIS6. I am able to get this to run on my local machine (Windows XP
IIS5). Here is my code:
jobNbr = Request.QueryString("jobNbr")
'Log in as an admin. I created a component to impersonate an administrator.
‘This works fine
Set objLogon = Server.CreateObject("LoginAdmin.ImpersonateUser")
objLogon.Logon "AdminUser", "AdminPassword", "domain"
Set wShell = Server.CreateObject("WSCRIPT.SHELL")
svrPath = Server.MapPath("/")
FilesPath = svrPath & "\devl\AFLDirect\Zip\QcsFiles\" & jobNbr
ZipPath = svrPath & "\devl\AFLDirect\Zip\QcsFiles\ZippedFiles\" & jobNbr &
".zip"
strZip = "wzzip.exe -rp -ee -ybc " & ZipPath & " " & FilesPath
returncode = wShell.run(strZip,0,true)
response.write returncode
Set wShell = nothing
objLogon.LogOff
set objLogon = nothing
When I run this th ReturnCode’s value is 254. I can’t find any info about
this code. I am assuming it has something to do with permissions or how IIS
is setup. I have tried creating a new application pool for this, but I still
get the same result. I checked the Web Service extensions and that seems to
look OK, but I could be wrong.
Thanks
with IIS6. I am able to get this to run on my local machine (Windows XP
IIS5). Here is my code:
jobNbr = Request.QueryString("jobNbr")
'Log in as an admin. I created a component to impersonate an administrator.
‘This works fine
Set objLogon = Server.CreateObject("LoginAdmin.ImpersonateUser")
objLogon.Logon "AdminUser", "AdminPassword", "domain"
Set wShell = Server.CreateObject("WSCRIPT.SHELL")
svrPath = Server.MapPath("/")
FilesPath = svrPath & "\devl\AFLDirect\Zip\QcsFiles\" & jobNbr
ZipPath = svrPath & "\devl\AFLDirect\Zip\QcsFiles\ZippedFiles\" & jobNbr &
".zip"
strZip = "wzzip.exe -rp -ee -ybc " & ZipPath & " " & FilesPath
returncode = wShell.run(strZip,0,true)
response.write returncode
Set wShell = nothing
objLogon.LogOff
set objLogon = nothing
When I run this th ReturnCode’s value is 254. I can’t find any info about
this code. I am assuming it has something to do with permissions or how IIS
is setup. I have tried creating a new application pool for this, but I still
get the same result. I checked the Web Service extensions and that seems to
look OK, but I could be wrong.
Thanks