Jump to content

Recommended Posts

  • 2 weeks later...
Posted

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

  • 1 month later...
Posted

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?

Posted
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... :sweating:

But thanks for the quick answer! I´ll check this and come back this later.

Posted
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... :(

Posted

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? :think:

Posted (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 by lgvlgv
Posted (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 by lgvlgv
Posted
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 :unsure: but how could the DLL Check fail when there is an existing dll?

Posted

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

Posted (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 by HouseRockerZz

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...