Hi All,I am using the below VB Script to Unzip a .zip file of size 1.8GB having around 32,000+ files after Unzipping.


Dim sCurPath

set filesys = Createobject("Scripting.FileSystemObject")

sCurpath = Replace(wscript.ScriptFullname, Wscript.ScriptName, "")
Set WshShell = CreateObject("Wscript.Shell")

ZipFile= sCurPath & "install-old.zip"
ExtractTo= "C:\InformaticaSource" 
If NOT filesys.FolderExists(ExtractTo) Then   
End If 

set objShell = CreateObject("Shell.Application")
set FilesInZip=objShell.NameSpace(ZipFile).items


While running the script on Windows 7 OS, I receive the DIALOG from "Interactive Services Detection" informing me that there is an error that I can retry,cancel or skip.

ERROR 0X80004005:Unspecified Error

This is the only error I receive and although I receive the error,I can see the file already present in the destination location with the same filesize(still I dont know why I receive the error) and I really want that the above script should automatically 'SKIP' errors when it is encountered.

Any Modifications to the above script to achieve this would be much appreciated..!! Thanks a lot for your assistance in advance..!!Kind Regards.

4 Comments   [ + ] Show Comments


  • does the script have to be a vb script?
    • Hi, Well...I finally got a "workaround" the problem by using PKZIP software.and It works like a charm now.However, if there wasn't PKZIP or any other third party software,then how to I achieve it using VBScript. If this isn't possible through VB Script.I would definitely want to know WHY..?
  • I did read a lot of posts on various tech forums and sites rehgarding this issue and the most common solution provided is to use another software for zipping and unzipping like 7-zip or PKZIP instead of VB Script.It looks like the OS Vista and Windows 7 which have the 'Interactive Services Dialog" coming up dont like zipping and Unzipping files using VB Script through Elevated User or System account and I wonder Y..?
  • If you're going to just skip errors [ !!! ], why not add 'On Error Resume Next'?

    Alternatively, you could actually try to work out *why* you're seeing the error (which I suspect translates to 'Access denied', something which ProcMon - YAAAAAAWN! - would've told you on Day One!) and code accordingly.
  • Hey VBScab, 1. I had already already added 'On Error Resume Next' and it still gave the error on Windows Vista and Windows 7 OS(but not on Windows XP), please note that the problem was not with the VB Script, it was with the .zip file. Interestingly, when running on System context on Windows Vista and Windows 7 OS, it is the "Interactive Services Dialog Detection' window which comes up and gives the "Unspecified error". This error does not arise when manually running the VB Script on either of these OS.I did run PROCMON but it was 'stuck' on the 'interactive services detection' service. If I disable this service, the error gets suppressed but the installtion remains 'stuck' forever..so, there is something that prevents the VB file from unzipping it cleanly which SecureZip does like a charm, any thoughts on this will certainly help,..thank you :)
Please log in to comment



Unzipping a file is same as copying a file in vbscript. we can use xcopy instead of a normal copy which is handle through a dos in wondows OS.

Its difficult to have end users installed 7-zip or x zip without any licences. So just unzip the file at source and copy it to the destination folder .

Zipped File --> Unzippedfolder in source

unZippedFolder = sCurPath & "install-old"
Destinationfolder= "C:\InformaticaSource" 

wshShell.run ""xcopy " & sCurPath & "install-old\* " & " " & "C\InformaticaSource" & " /s /f /r /y /i /z""

\* --> Copy current folder all sub folders

/s --> To copy a folder including all subfolders.
/i --> defines the destination as folder.

/y -->Suppress prompt to confirm overwriting a file

/f-->Display full source and destination file names while copying.

/r-->Overwrite read-only files.

/z-->Copy files in restartable mode. If the copy is interrupted part way through, it will restart if possible. (use on slow networks)

hope it helps.

Answered 01/30/2014 by: mirzarafeeq20
White Belt

Please log in to comment

got the same problem sometime ago and got around using 7-zip.

7za.exe x FILE.zip -y

this extracts all files with full folders and answers alls queries with "yes" (which also skips these errors)

Other packers may work too

Answered 07/17/2013 by: Nico_K
Red Belt

  • Thanks for your response..do you have any such option (answering all queries with "skip") in VB Script..?
Please log in to comment
Answer this question or Comment on this question for clarity