2013-07-22 24 views
2

我正在使用下面的vb腳本解壓縮文件,所以在解壓縮的過程中,我看到彈出的messgae(複製/解壓),有沒有擺脫彈出消息的方式?VB腳本:解壓縮文件時出現消息

FileToGetUnZipped = "InstallDir\UI_Files.zip" 
DestPathForUnzippedFile = "InstallDir\system" 

Set objFSO = CreateObject("Scripting.FileSystemObject") 

If Not objFSO.FolderExists(DestPathForUnzippedFile) Then 
    objFSO.CreateFolder(DestPathForUnzippedFile) 
End If 

UnZipFile FileToGetUnZipped, DestPathForUnzippedFile 

Sub UnZipFile(strArchive, DestPathForUnzippedFile) 
    Set objApp = CreateObject("Shell.Application") 

    Set objArchive = objApp.NameSpace(strArchive).Items() 
    Set objDest = objApp.NameSpace(DestPathForUnzippedFile) 

    objDest.CopyHere objArchive 
End Sub 

回答

3

CopyHere方法需要其可以是各種選項的組合,其中包括第二個參數

(4)

不顯示進度對話框。

不過,我還沒有在得到很多的這些選項來可靠地工作很成功 - 我認爲它的Windows版本多達別的變化。

作爲一個附註,我認爲你可能會遇到CopyHere方法異步的問題 - 你的腳本可能在CopyHere之前完成,這可能會終止複製過程。

+0

objDest.CopyHere objArchive,4正在爲我工​​作。謝謝。 – user1752602

相關問題