Wzzip.exe stops responding when you use the WshShell.Exec method to run Wzzip.exe on a Windows Server 2003-based computer (914046)
The information in this article applies to:
- Microsoft Windows Server 2003, Standard Edition
- Microsoft Windows Server 2003, Enterprise Edition
- Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
- Microsoft Windows Server 2003, Standard x64 Edition
- Microsoft Windows Server 2003, Enterprise x64 Edition
SYMPTOMSWhen you use the WshShell.Exec method to run Wzzip.exe on a Microsoft Windows Server 2003-based
computer, Wzzip.exe stops responding.
Note Wzzip.exe is the command-line version of WinZip. WORKAROUNDTo work around this problem, add code to your program or
script to handle the data that is sent to the StdErr output from Wzzip.exe. For example, the commented lines in the
following sample script show how to work around this problem. Option Explicit
On Error Resume Next
Dim streamOut
Dim objShell
Dim objExecObject
Dim strZipCommand
'Dim temperr
Set streamOut = Wscript.StdOut
strZipCommand = "wzzip C:\Temp\output.zip C:\Temp\input.log"
Set objShell = WScript.CreateObject("WScript.Shell")
Set objExecObject = objShell.Exec("%comspec% /c " & strZipCommand)
Do While objExecObject.Status = 0
WScript.Sleep 100
'To resolve the problem uncomment the line below which throws
'away all the data from stderr
'temperr = objExecObject.Stderr.ReadLine()
Do Until objExecObject.StdOut.AtEndOfStream
streamOut.WriteLine(objExecObject.StdOut.ReadLine())
Loop
Loop
Modification Type: | Major | Last Reviewed: | 3/13/2006 |
---|
Keywords: | kbhowto kbinfo KB914046 kbAudITPRO |
---|
|