Ich Benutze diesen Code von "rondebruin" um eine Zip Datei (mit Passwort) zu entpacken. Trotz vorgabe des Passwortes fragt es mich immer wieder danach.
Ist es nicht möglich diese Passwort abfrage von FilZip zu unterbinden oder nicht anzeigen zu lassen?
Declare Function OpenProcess Lib "kernel32" _
(ByVal dwDesiredAccess As Long, _
ByVal bInheritHandle As Long, _
ByVal dwProcessId As Long) As Long
Declare Function GetExitCodeProcess Lib "kernel32" _
(ByVal hProcess As Long, _
lpExitCode As Long) As Long
Public Const PROCESS_QUERY_INFORMATION = &H400
Public Const STILL_ACTIVE = &H103
Public Sub ShellAndWait(ByVal PathName As String, Optional WindowState)
Dim hProg As Long
Dim hProcess As Long, ExitCode As Long
If IsMissing(WindowState) Then WindowState = 1
hProg = Shell(PathName, WindowState)
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, False, hProg)
Do
GetExitCodeProcess hProcess, ExitCode
DoEvents
Loop While ExitCode = STILL_ACTIVE
End Sub
Sub UnzipFile()
Dim PathZipProgram As String, NameUnZipFolder As String
Dim FileNameZip As Variant, ShellStr As String
Dim Password As String
PathZipProgram = "C:\Program Files\FileZip"
If Right(PathZipProgram, 1) "\" Then
PathZipProgram = PathZipProgram & "\"
End If
If Dir(PathZipProgram & "Filzip.exe") = "" Then
MsgBox "Please find your copy of Filzip.exe and try again"
Exit Sub
End If
NameUnZipFolder = "C:\Documents and Settings\BorgesPau\Desktop\Neuer Ordner\"
FileNameZip = "C:\Documents and Settings\BorgesPau\Desktop\Neuer Ordner\PB2.zip"
Password = """6049"""
ShellStr = PathZipProgram & "Filzip -e -s" & Password & " " & Chr(34) & FileNameZip & Chr(34) & " " & Chr(34) & NameUnZipFolder & Chr(34)
ShellAndWait ShellStr, vbHide
End Sub
Gruß
Paulo