Jump to content











Photo
- - - - -

Please help to unpack zip file


Best Answer paraglider , 02 July 2016 - 11:48 AM

Use instead:

 

ShellExecute,hide,%Tools%\7z.exe,"x -y #$q%TargetDir%\Program Files\%ProgramName%\image.zip#$q -o#$q%TargetDir%\Program Files\%ProgramName%#$q"
 

Go to the full post


  • Please log in to reply
7 replies to this topic

#1 dunhill

dunhill
  • Members
  • 4 posts
  •  
    Vietnam

Posted 01 July 2016 - 02:21 PM

First, I am sorry for my English.

 

Second, I am newbie and need help to build my script.

 

The file Image.zip which has been attached to section [EncodedFile-MyCopy-Image.zip] of my script file need to be decompressed into folder %ProgramName%. Below is my script:

[variables]
%ProgramName%=MyCopy
%ProgramExe%=MyCopy.exe
%ProgramTitle%=MyCopy

[process]
echo,"Making new directories..."
If,Not,ExistDir,"%TargetDir%\Program Files\%ProgramName%",DirMake,"%TargetDir%\Program Files\%ProgramName%"
echo,"Extracting %ProgramName% Files to Folder %ProgramName%"
ExtractAllFiles,%ScriptFile%,"MyCopy","%TargetDir%\Program Files\%ProgramName%"
Unpack,%ScriptFile%,Archive,"MyCopy",Image.zip,"%TargetDir%\Program Files\%ProgramName%"

[EncodedFolders]
MyCopy

[MyCopy]
Image.zip=46639,62186

[EncodedFile-MyCopy-Image.zip]
...

I use unpack, but Winbuilder 0.82 does not decompress file Image.zip into folder %ProgramName% . 

 

Please help me to do it.

 

Thanks in advanced

 

 



#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 01 July 2016 - 04:16 PM

http://wb.paraglider...elp/unpack.html

 

Syntax 1:

Unpack,[Section],[Archive],[Option],[Target],[ProgramFolder],[Filename]

 

 

 

Syntax 2:

Unpack,[Filename],Action,[Param3],[Param4],[Param5]

 

 

Your line:

 

 

Unpack,%ScriptFile%,Archive,"MyCopy",Image.zip,"%TargetDir%\Program Files\%ProgramName%"

 

 

The syntax is TERRIBLE :frusty: and it is easy to get confused by parameters and parameter names in the examples.

 

Try with:
Unpack,MyCopy,Image.zip,,,"%TargetDir%\Program Files\%ProgramName%"

 

As in (Syntax1):

Unpack Archive.7z from section Doc to Program Files\%ProgramFolder%\Help (unzip the archive and delete it after)

Unpack,Doc,Archive.7z,,,%ProgramFolder%\Help

 

 

Or with (Syntax2):

Unpack,%ScriptFile%,Archive,MyCopy,Image.zip,"%TargetDir%\Program Files\%ProgramName%"

 

As in:

Unpack Archive.7z from %ScriptDir%\other.script from section Doc to Program Files\%ProgramFolder%\Help (unzip the archive and delete it after)

Unpack,%ScriptDir%\other.script,Archive,Doc,Archive.7z,%Target_Prog%\%ProgramFolder%\Help

 

 

The "section" name is not within double quotes. :unsure:

 

:duff:

Wonko


  • dunhill likes this

#3 dunhill

dunhill
  • Members
  • 4 posts
  •  
    Vietnam

Posted 02 July 2016 - 01:51 AM

 

Try with:
Unpack,MyCopy,Image.zip,,,"%TargetDir%\Program Files\%ProgramName%"

 

 

Or with (Syntax2):

Unpack,%ScriptFile%,Archive,MyCopy,Image.zip,"%TargetDir%\Program Files\%ProgramName%"

 

 

Thank you very much

 

I have tried both syntax, the file Image.zip exists in folder %ProgramName% but nothing decompressed.

 

Is there any way to do it?



#4 paraglider

paraglider

    Gold Member

  • .script developer
  • 1743 posts
  • Location:NC,USA
  •  
    United States

Posted 02 July 2016 - 11:38 AM

Unpack command was removed from the macro library.


  • dunhill likes this

#5 paraglider

paraglider

    Gold Member

  • .script developer
  • 1743 posts
  • Location:NC,USA
  •  
    United States

Posted 02 July 2016 - 11:48 AM   Best Answer

Use instead:

 

ShellExecute,hide,%Tools%\7z.exe,"x -y #$q%TargetDir%\Program Files\%ProgramName%\image.zip#$q -o#$q%TargetDir%\Program Files\%ProgramName%#$q"
 


  • Elliot Labs and dunhill like this

#6 paraglider

paraglider

    Gold Member

  • .script developer
  • 1743 posts
  • Location:NC,USA
  •  
    United States

Posted 02 July 2016 - 11:52 AM

Creator of macro library does not care about compatibility between third party scripts and the macro library. If you complain about commands being deleted then he will just respond hard luck all official scripts have been fixed.


  • dunhill likes this

#7 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 02 July 2016 - 06:41 PM

Creator of macro library does not care about compatibility between third party scripts and the macro library. If you complain about commands being deleted then he will just respond hard luck all official scripts have been fixed.

 

Which could be shortened to:

Creator of macro library does not care

 

;)

 

:duff:

Wonko


  • dunhill likes this

#8 dunhill

dunhill
  • Members
  • 4 posts
  •  
    Vietnam

Posted 03 July 2016 - 12:55 AM

Use instead:

 

ShellExecute,hide,%Tools%\7z.exe,"x -y #$q%TargetDir%\Program Files\%ProgramName%\image.zip#$q -o#$q%TargetDir%\Program Files\%ProgramName%#$q"
 

 

It works, thank you very much






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users