wcoka
asked on
How to test from VB if a zip file password is correct?
I need to test from VB if an especific word is the correct password for a zip file... How can I do this?
ASKER
I did what it says, I add the 2 files
cUnzip.cls
mUnzip.bas
Then add this line in the form
Private WithEvents m_cUnzip As cUnzip
and with a command I put this code
m_cUnzip.ZipFile = sFIle
' Set the base folder to unzip to:
m_cUnzip.UnzipFolder = sFolder
' Unzip the file!
m_cUnzip.Unzip
But I get error 91
Can you try to do this? or recommend me other way to do this?
Can it be because I'm using XP?
cUnzip.cls
mUnzip.bas
Then add this line in the form
Private WithEvents m_cUnzip As cUnzip
and with a command I put this code
m_cUnzip.ZipFile = sFIle
' Set the base folder to unzip to:
m_cUnzip.UnzipFolder = sFolder
' Unzip the file!
m_cUnzip.Unzip
But I get error 91
Can you try to do this? or recommend me other way to do this?
Can it be because I'm using XP?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The problem is that if the first time you send the incorrect password the something happend that even if later you send it correctly you still get the error of incorrect password... Please try it send an incorrect password then try with the correct one
Thanks
Thanks
wcoka,
Sorry for the delay in responding, I got VERY busy.
The dll seems to have someting in it to skip a file if you give three bad passwords, I think you need to close the zip and reopen it after three failed attempts.
Dang123
Sorry for the delay in responding, I got VERY busy.
The dll seems to have someting in it to skip a file if you give three bad passwords, I think you need to close the zip and reopen it after three failed attempts.
Dang123
This may be what your looking for
Unzipping files using the free Info-Zip Unzip DLL with VB
http://vbaccelerator.com/codelib/zip/unzip.htm
Dang123