i am facing a trouble here,Could you please tell me how to unzip a password protected field in vbscript? I have a code which runs perfectly,but it asking password each time whe
AFAIK the Shell.Application
object doesn't support providing a password. Try 7-zip instead:
pass = "..."
zipfile = "your.zip"
CreateObject("WScript.Shell").Run "7za.exe x -p" & pass & " " & zipfile, 0, True
If necessary add the path to 7za.exe
and/or file.zip
. If the path contains spaces, you'll also need to put double quotes around it, e.g. like this:
Function qq(str) : qq = Chr(34) & str & Chr(34) : End Function
zipfile = qq("C:\path\with spaces\to\your.zip")