Forum Discussion

rajeshthomas's avatar
rajeshthomas
Contributor
14 years ago
Solved

How to extract a zip file and Can we hide the password that we enter in script ?

Hi  Question 1: I have a Zip file with name 1.zip , placed in "D:\Test". Can anyone help me in VB scripting to extract(unzip) this file in the same location. Although i have Winzip in my sy...
  • irina_lukina's avatar
    14 years ago

    Hi Rajesh,


    the zip has password. so when i run the script i get a window popup asking for password.


    The problem is that the object (Shell.Application) I used in the script below doesn't allow using passwords. So, you cannot modify it to accomplish the task you need.


    I have only two suggestions:

    1. Search the VBScript forums for another approach that can be used to extract files from password-protected archives. Maybe, there is a solution, but, unfortunately, I don't know it.

    2. As an alternative, you can use an additional tool (like WinZip, 7-Zip or another) and create a script that will call it from the command line with the needed parameters. I know that you didn't want to use this approach, but I cannot suggest you any alternative.