Comboku Posted July 7, 2016 Posted July 7, 2016 Hi guys, I have some encrypted files on my hard drive which zip.au3 can't open. This is perfectly fine. The Problem is that my program crashes as soon as it tries to access the file. Is there a way to detect if the file is encrypted BEFORE autoit tries to open it? I am using _zip_unzipall to unzip the file, i also tried _zip_count with the same result. My files are encrypted with SafeGuard Lan Crypt. Local $Testzip = "C:\tmp\Test.zip" $hFileOpen = _Zip_SearchInFile($Testzip, @ScriptDir) If $hFileOpen = -1 Then MsgBox($MB_SYSTEMMODAL, "", "An error occurred when reading the file.") Else MsgBox($MB_SYSTEMMODAL, "", "Done") EndIf Thanks, Comboku
HouseRockerZz Posted August 15, 2016 Posted August 15, 2016 Hi Torels, first of all I´d like to thank you for this UDF. 2nd point is, that I´m getting an Error with your UDF... I´m using Windows 10 and the Error message I´m getting is: Spoiler "D:\AutoIt\AutoIt3\Include\Zip.au3" (333) : ==> The requested action with this object has failed.: $hList = $oApp.Namespace($hZipFile).Items $hList = $oApp.Namespace($hZipFile)^ ERROR The Code I am working with is: $Zip = _Zip_Create(@ScriptDir & "\#data\" & "\Backup\" & $Raum & "_" & _NowDate() & " " & $Zeit & " Uhr" &".zip") $Root = @ScriptDir & "\" & $Raum & $Verbindung & $I & $Endung MsgBox($MB_SYSTEMMODAL, "", $Root) _Zip_AddFolder($Zip, $Root) Can you tell me what the problem is?
lgvlgv Posted August 15, 2016 Posted August 15, 2016 (edited) If $DLLChk <> 0 Then Return SetError($DLLChk, 0, 0);no dll Think this udf is based on an dll that dosent exist in win10 sorry, u could try http://www.autoitscript.com/forum/topic/85094-7zip/ this is also with a "dll" but it works greate. Edited August 15, 2016 by lgvlgv HouseRockerZz 1
HouseRockerZz Posted August 16, 2016 Posted August 16, 2016 11 hours ago, lgvlgv said: If $DLLChk <> 0 Then Return SetError($DLLChk, 0, 0);no dll Think this udf is based on an dll that dosent exist in win10 sorry, u could try http://www.autoitscript.com/forum/topic/85094-7zip/ this is also with a "dll" but it works greate. Hi lgvlgv, it worked a while until I changed something. But I dont really know, what I have changed to let it stop working... But thanks for the quick answer! I´ll check this and come back this later.
HouseRockerZz Posted August 16, 2016 Posted August 16, 2016 18 hours ago, HouseRockerZz said: Hi Torels, first of all I´d like to thank you for this UDF. 2nd point is, that I´m getting an Error with your UDF... I´m using Windows 10 and the Error message I´m getting is: Reveal hidden contents "D:\AutoIt\AutoIt3\Include\Zip.au3" (333) : ==> The requested action with this object has failed.: $hList = $oApp.Namespace($hZipFile).Items $hList = $oApp.Namespace($hZipFile)^ ERROR The Code I am working with is: $Zip = _Zip_Create(@ScriptDir & "\#data\" & "\Backup\" & $Raum & "_" & _NowDate() & " " & $Zeit & " Uhr" &".zip") $Root = @ScriptDir & "\" & $Raum & $Verbindung & $I & $Endung MsgBox($MB_SYSTEMMODAL, "", $Root) _Zip_AddFolder($Zip, $Root) Can you tell me what the problem is? I forgot to say, that the creating of the Zipfile works fine. It´s just the Folder adding, i got issues with...
HouseRockerZz Posted August 16, 2016 Posted August 16, 2016 I redownloaded the GUI and copied it again with overwriting. Now everything on my Computer works fine, but on other Computers, the program starts copiing the first file to the zip file and then stops... Has anyone a solution for this problem?
lgvlgv Posted August 16, 2016 Posted August 16, 2016 can u check if this dll or reg key exists? Func _Zip_DllChk() If Not FileExists(@SystemDir & "\zipfldr.dll") Then Return 2 If Not RegRead("HKEY_CLASSES_ROOT\CLSID\{E88DCCE0-B7B3-11d1-A9F0-00AA0060FA31}", "") Then Return 3 Return 0 EndFunc ;==>_Zip_DllChk
HouseRockerZz Posted August 17, 2016 Posted August 17, 2016 (edited) 19 hours ago, lgvlgv said: can u check if this dll or reg key exists? Func _Zip_DllChk() If Not FileExists(@SystemDir & "\zipfldr.dll") Then Return 2 If Not RegRead("HKEY_CLASSES_ROOT\CLSID\{E88DCCE0-B7B3-11d1-A9F0-00AA0060FA31}", "") Then Return 3 Return 0 EndFunc ;==>_Zip_DllChk The dll is existing but the reg key isn´t existing... Edited August 17, 2016 by HouseRockerZz
lgvlgv Posted August 17, 2016 Posted August 17, 2016 (edited) Think windows is doing som updates, thats why i went with 7zip, bring my "own" dll. then it always work and ur not depending on os stuff Edited August 17, 2016 by lgvlgv
HouseRockerZz Posted August 17, 2016 Posted August 17, 2016 3 minutes ago, lgvlgv said: Think windows is doing som updates, thats why i went with 7zip, bring my "own" dll. then it always work and ur not depending on os stuff How do you mean this?
lgvlgv Posted August 17, 2016 Posted August 17, 2016 (edited) i also had problems with windows 10, but my script run flawless on other os, thats when i looked at other sulutions, and found 7zip here on forums, it works very good. im no script kid but i think the "$ObjCreate" fails becose of the error returned by _Zip_DllChk() .Local $files = _Zip_Count($hZipFile) If $DLLChk <> 0 Then Return SetError($DLLChk, 0, 0);no dll Edited August 17, 2016 by lgvlgv
lgvlgv Posted August 17, 2016 Posted August 17, 2016 maybe win10 updated the zip function? try set dllchk to always 0
HouseRockerZz Posted August 17, 2016 Posted August 17, 2016 4 minutes ago, lgvlgv said: i also had problems with windows 10, but my script run flawless on other os, thats when i looked at other sulutions, and found 7zip here on forums, it works very good. im no script kid but i think the "$ObjCreate" fails becose of the error returned by _Zip_DllChk() .Local $files = _Zip_Count($hZipFile) If $DLLChk <> 0 Then Return SetError($DLLChk, 0, 0);no dll That´s bad but how could the DLL Check fail when there is an existing dll?
lgvlgv Posted August 17, 2016 Posted August 17, 2016 in both cases it returns error the key also need to be there, maybe windows 10 dosent need it anymore or changed to another key? If Not FileExists(@SystemDir & "\zipfldr.dll") Then Return 2 If Not RegRead("HKEY_CLASSES_ROOT\CLSID\{E88DCCE0-B7B3-11d1-A9F0-00AA0060FA31}", "") Then Return 3 Return 0
HouseRockerZz Posted August 17, 2016 Posted August 17, 2016 This is the only Key I could find with cls... I think it changed... Shall I try to change the searching filter to this key?
HouseRockerZz Posted August 17, 2016 Posted August 17, 2016 (edited) 20 minutes ago, lgvlgv said: try remark both and allways return 0 ? I remarked both and it´s still working... Should I leave like this? Edit: I get the same Error after a few new starts of the program... Edited August 17, 2016 by HouseRockerZz
lgvlgv Posted August 17, 2016 Posted August 17, 2016 u could leave it if it works, but i would go with 7zip until the author updates this script or some one more skilled then me fix the issue HouseRockerZz 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now