Anzeige
Archiv - Navigation
1228to1232
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

Filzip Datei mit Passwort entpacken über VBA

Filzip Datei mit Passwort entpacken über VBA
Paulo
Hallo Liebe Freunde,
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

2
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Benutzer
Anzeige
AW: Filzip Datei mit Passwort entpacken über VBA
29.09.2011 12:47:12
Harald
Hallo Paulo,
ich kann Dir zu Filzip leider nicht helfen, aber Shellstr sieht so aus:
C:\Program Files\FileZip\Filzip -e -s"6049" "C:\Documents and Settings\BorgesPau\Desktop\Neuer Ordner\PB2.zip" "C:\Documents and Settings\BorgesPau\Desktop\Neuer Ordner\"
Muss das Passwort in Anführungszeichen stehen? Wenn nicht, ändere diese Zeile:
Password = 6049
dann lautet Shellstr so:
C:\Program Files\FileZip\Filzip -e -s6049 "C:\Documents and Settings\BorgesPau\Desktop\Neuer Ordner\PB2.zip" "C:\Documents and Settings\BorgesPau\Desktop\Neuer Ordner\"
ggfls. fehlt jetzt noch ein Leerzeichen zwischen "-s" und dem Passwort?
Gruß Harald
Anzeige
AW: Filzip Datei mit Passwort entpacken über VBA
29.09.2011 23:08:12
Paulo
Hallo Harald
Danke für deine Vorschläge, aber irgend wie will er das vorgegebene PW nicht akzeptieren. Habe auch schon andere varianten versucht, vergebens. Es kommt immer wieder die Aufforderung das PW manuell einzugeben.
Gruß Paulo

322 Forumthreads zu ähnlichen Themen

Anzeige
Anzeige
Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige