鸟人 发表于 2009-9-10 10:31:33

RunWait(@ComSpec & " /c " & " ")调用WINRAR问题

本帖最后由 鸟人 于 2009-9-12 10:35 编辑

调用WINRAR打包最后一个盘下NOD32_BackUp里的所有文件到NOD32Bases.rar

$ver = DriveGetDrive("FIXED")
$i = $ver
$bases = StringUpper($ver[$i])
FileWriteLine($bases & "\NOD32_BackUp\BackUp.bat", "start winRAR.exe a "&$bases & "\NOD32_BackUp\NOD32Bases.rar "&$bases & "\NOD32_BackUp\*"& @CRLF)
FileClose($bases & "\NOD32_BackUp\BackUp.bat")
RunWait($bases & "\NOD32_BackUp\BackUp.bat", "", @SW_HIDE)
FileDelete($bases & "\NOD32_BackUp\BackUp.bat")

这样没问题。

$ver = DriveGetDrive("FIXED")
$i = $ver
$bases = StringUpper($ver[$i])
RunWait(@ComSpec & " /c " & " winRAR.exe a "&$bases & "\NOD32_BackUp\NOD32Bases.rar "&$bases & "\NOD32_BackUp\*","",@SW_HIDE)

但这样写怎么就不行呢,
RunWait(@ComSpec & " /c " & " winRAR.exeae:\NOD32_BackUp\NOD32Bases.rar    e:\NOD32_BackUp\*","",@SW_HIDE)
这样还是不行
错在那里????

afan 发表于 2009-9-10 10:55:31

$ver = DriveGetDrive("FIXED")
$i = $ver
$bases = StringUpper($ver[$i])
RunWait(@ComSpec & " /c " & " start winRAR.exe a " & $bases & "\NOD32_BackUp\NOD32Bases.rar " & $bases & "\NOD32_BackUp\*", "", @SW_HIDE)

zhwu530 发表于 2009-9-10 11:03:20

我哭!!!!!:face (30):
这个错犯的好傻!!!

鸟人 发表于 2009-9-10 11:07:54

唉!!!
真的是好傻哦

afan 发表于 2009-9-10 15:03:12

没解决吗?鸟人???

brucexlee 发表于 2009-11-23 20:41:57

多谢,正需要!

xmzhqw 发表于 2010-4-25 12:51:08

高手真的多,厉害!

xiong616 发表于 2010-7-17 16:52:40

拿了东西道声谢..{:face (396):}

紫色风林 发表于 2011-9-4 18:32:04

我晕死,为了找一个自解压的例子搞了半天都没找到

lleheaven 发表于 2012-6-7 00:26:58

回复 2# afan


    原来如此,thx

虚谷198688 发表于 2015-7-26 09:48:40

如果是 用 $ver = fileread($file)
$i = $ver
$bases = StringUpper($ver[$i])
RunWait(@ComSpec & " /c " & " echo" & $bases & ">>" & "F\"".txt"", "", @SW_HIDE)怎么执行啊谢谢
页: [1]
查看完整版本: RunWait(@ComSpec & " /c " & " ")调用WINRAR问题