-
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