Vbscript VB脚本:解压文件时的消息
我正在使用下面的vb脚本解压文件,所以在解压过程中,我看到一个弹出消息(复制/提取),有没有办法摆脱弹出消息Vbscript VB脚本:解压文件时的消息,vbscript,Vbscript,我正在使用下面的vb脚本解压文件,所以在解压过程中,我看到一个弹出消息(复制/提取),有没有办法摆脱弹出消息 FileToGetUnZipped = "InstallDir\UI_Files.zip" DestPathForUnzippedFile = "InstallDir\system" Set objFSO = CreateObject("Scripting.FileSystemObject") If Not objFSO.FolderExists(DestPathForUnzippe
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
该方法采用第二个参数,该参数可以是各种选项的组合,包括
(四)
不显示进度对话框
然而,我并没有成功地让这些选项中的许多可靠地工作——我认为它和其他任何东西一样,因Windows版本而异
作为旁注,我认为您可能对CopyHere
方法的异步性有问题-您的脚本可能在CopyHere
之前完成,这可能会终止复制过程