I have a batch file located at c:\inetpub\scripts\pca.bat. The contents of the batch file start pcAnywhere and take an IP address as a parameter:
Start "" "C:\Program Files\Symantec\pcAnywhere\AWREM32.EXE" "P:\Programs\pcAnywhere\Template.chf" /C%1
I am trying to call this batch file with ASPExec on a Windows XP pro box for testing (IIS5). Here is the code calling it:
<%
If Len(Request.QueryString("IP")) > 0 Then
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = Server.MapPath("/scripts/pca.bat") & " " & Request.QueryString("IP")
'Executor.Parameters =
Executor.ShowWindow = True
Response.Write "Attempting to execute " & Executor.Application & "<br>"
strResult = Executor.ExecuteDosApp
Response.Write "The result of this call was: " & strResult
End if
%>
I know the server creates the ASPexec object that calls the batch file. Is the batch file trying to run the pcAnywhere executable from the server and not the clients local machine? I am getting this return message written from the above code:
Attempting to execute C:\Inetpub\Scripts\pca.bat <IP Address from querystring>
The result of this call was: Access is denied.
The scripts directory has IUSR_<MachineName> setup with Read/Write/Execute permissions. The execute permissions are set to "Scripts and executables" in IIS manager. I don't know a lot about IIS so any help would be appreciated.
Start "" "C:\Program Files\Symantec\pcAnywhere\AWREM32.EXE" "P:\Programs\pcAnywhere\Template.chf" /C%1
I am trying to call this batch file with ASPExec on a Windows XP pro box for testing (IIS5). Here is the code calling it:
<%
If Len(Request.QueryString("IP")) > 0 Then
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = Server.MapPath("/scripts/pca.bat") & " " & Request.QueryString("IP")
'Executor.Parameters =
Executor.ShowWindow = True
Response.Write "Attempting to execute " & Executor.Application & "<br>"
strResult = Executor.ExecuteDosApp
Response.Write "The result of this call was: " & strResult
End if
%>
I know the server creates the ASPexec object that calls the batch file. Is the batch file trying to run the pcAnywhere executable from the server and not the clients local machine? I am getting this return message written from the above code:
Attempting to execute C:\Inetpub\Scripts\pca.bat <IP Address from querystring>
The result of this call was: Access is denied.
The scripts directory has IUSR_<MachineName> setup with Read/Write/Execute permissions. The execute permissions are set to "Scripts and executables" in IIS manager. I don't know a lot about IIS so any help would be appreciated.