<%
dim ylj,ywj,Mlpath,Shell,rarcomm,RetCode,cmd,comm,fso
Mlpath="E:\page\mian\" '存放RAR.EXE和CMD.EXE的路徑
ylj=Server.mappath("mian")&"\" '解壓文件後所放的路徑
ywj=Server.mappath("mian\apathy.rar") '要解壓的RAR文件
Set Shell = Server.CreateObject("WScript.Shell")
rarcomm= "E:\page\mian\cmd.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文件的。