In fact, want to achieve this function is very simple, first of all to upload a RAR decompression program, is RAR own decompression program, only need its core
Program RAR.EXE this file is OK. Then you will upload a program that executes RAR.EXE CMD. EXE This is a program in Windows (don't need me to say it). Finally, we started to implement these procedures. Take a look at the following code
<%
Dim Ylj,ywj,mlpath,shell,rarcomm,retcode,cmd,comm,fso
Mlpath= "E:pagemian" to store RAR.EXE and CMD.EXE paths
Ylj=server.mappath ("Mian") & "'" ' the path after extracting the file
Ywj=server.mappath ("Mianapathy.rar") ' RAR file to extract
Set Shell = Server.CreateObject ("Wscript.Shell")
Rarcomm= "e:pagemiancmd.exe/c" &Mlpath& "Rar.exe x-t-o+-p-"
cmd=rarcomm&ywj& "" &ylj
RetCode = Shell.run (cmd,1, True)
%>
is using Server.CreateObject ("Wscript.Shell") to perform CMD.EXE to run RAR.EXE files to extract RAR files.
I didn't know if any of our predecessors had published these articles before, but the brother is interested in using this method to achieve many similar and such procedures, and I hope you can find some better ways.