如何使用内部Windows XP选项在VBScript中解压缩文件

我想使用VBScript解压缩.zip文件,只是它一直是一个没有外部应用程序的新电脑.现在我知道 Windows XP和2003有一个内部的.zip文件夹选项,所以我想我可以通过VBScript使用它来提取文件.

我该怎么做?

我试过了:

Set objShell = CreateObject("Shell.Application")

Set SrcFldr = objShell.NameSpace(fileName)
Set DestFldr = objShell.NameSpace(appDir)
DestFldr.copyHere(SrcFldr)

哪个没有工作.
可能是什么问题呢?

只需设置ZipFile = zip文件的位置,ExtractTo =到zip文件应该被提取到的位置.
'The location of the zip file.
ZipFile="C:\Test.Zip"
'The folder the contents should be extracted to.
ExtractTo="C:\Test\"

'If the extraction location does not exist create it.
Set fso = CreateObject("Scripting.FileSystemObject")
If NOT fso.FolderExists(ExtractTo) Then
   fso.CreateFolder(ExtractTo)
End If

'Extract the contants of the zip file.
set objShell = CreateObject("Shell.Application")
set FilesInZip=objShell.NameSpace(ZipFile).items
objShell.NameSpace(ExtractTo).copyHere(FilesInZip)
Set fso = nothing
Set objShell = nothing

相关文章

Windows2012R2备用域控搭建 前置操作 域控主域控的主dns:自...
主域控角色迁移和夺取(转载) 转载自:http://yupeizhi.blo...
Windows2012R2 NTP时间同步 Windows2012R2里没有了internet时...
Windows注册表操作基础代码 Windows下对注册表进行操作使用的...
黑客常用WinAPI函数整理之前的博客写了很多关于Windows编程的...
一个简单的Windows Socket可复用框架说起网络编程,无非是建...