Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASPExecute

Status
Not open for further replies.

GDX

Programmer
Jun 4, 2000
186
US
Hello,
I am trying to use ASPExec in conjunction with PKUnzip to unzip files into a certain directory, the following is part of my code:

Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "cmd.exe"
ExecuteString = "/c C:\PKUNZIP.exe " & File.Path & " " & FolderPath
Executor.Parameters = ExecuteString
Executor.Showwindow = true
sResult = Executor.ExecuteDosApp

When i run this i get an output of:

/c C:\PKUNZIP.exe C:\Upload\file_system.zip C:\Photos\41102123409677\ PKUNZIP (R) FAST! Extract Utility Version 2.50 03-01-1999 Copr. 1989-1999 PKWARE Inc. All Rights Reserved. Shareware Version PKUNZIP Reg. U.S. Pat. and Tm. Off. þ Pentium II class CPU detected. þ XMS version 2.00 detected. þ DPMI version 0.90 detected. PKUNZIP: (E09) can't find: C:/Upload/file_system.zip


It says Can't find: C:/Upload/file_system.zip I dont understand why it cant find the file its sitting in the directory, any ideas on how to resolve this problem? Gordon R. Durgha
gd@vslink.net
 
Apart from a few minor alterations, which should alter anything I got you code to work, all be it not showing the command prompt window. I know this is something to do with Interact with Desktop on the service which is checked but is still not working. The code I used is:

<%
Dim FilePath, Folderpath
Set Executor = Server.CreateObject(&quot;ASPExec.Execute&quot;)
Executor.Application = &quot;cmd.exe&quot;
ExecuteString = &quot;/c C:\PKUNZIP.exe C:\Inetpub\Executor.Parameters = ExecuteString
Executor.Showwindow = true
sResult = Executor.ExecuteDosApp
Response.Write &quot;Result: &quot; & sResult & &quot;<p>&quot;
%>

The only dubious thing I see in your code is the reference to File.Path which should throw an error so I assume the code you've shown is not exactly what you're running?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top