компютри | 17.10.11 21:02
… without having a proper Zip program like WinZip or 7Zip?
Very easy, actually. Put the following code in a VBS file, i.e. unzip.vbs and execute with cscript unzip.vbs.
Dim FSO, oApp, Source, Dest
Source = "c:\fully\qualified\path\file.zip"
Dest = "c:\another\fully\qualified\path\"
Set oApp = CreateObject("Shell.Application")
oApp.Namespace((Dest)).CopyHere oApp.Namespace((Source)).items
On Error Resume Next
Set FSO = CreateObject("scripting.filesystemobject")
FSO.deletefolder Environ("Temp") & "\Temporary Directory*", True
WScript.Echo "done unzipping"
Source and Dest MUST BE fully qualified file and directory names. Won’t work otherwise.