<%
dim ylj,ywj,Mlpath,Shell,rarcomm,RetCode,cmd,comm,fso
Mlpath="E:pagemian" '存放RAR.EXE和CMD.EXE的路径
ylj=Server.mappath("mian")&"" '解压文件后所放的路径
ywj=Server.mappath("mianapathy.rar") '要解压的RAR文件
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)
%>
就是用Server.CreateObject("WScript.Shell")来执行CMD.EXE来运行RAR.EXE文件来解压RAR文件的。