Jump to content











Photo
- - - - -

[Release] Unwbzip


  • Please log in to reply
15 replies to this topic

#1 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 17 March 2010 - 09:43 PM

From time to time it happens that you need to get a file out of a Winbuilder .script and you don't actually want to run Winbuilder, for any reason.

There is a misknown tool, wbzip.exe, that allows extracting encoded files from command line.

There are several versions around, as often happens there is no actual trace of it's evolution, or nothing even comparable to a proper history, help, etc., etc.

Some traces can be found here (just to know whom you might eventually thank for at least attempting to keep things in a minimal kind of order ;)):
http://www.boot-land...?showtopic=9673
http://www.boot-land...p?showtopic=565

It's syntax is simply awful ;) and it can easily get you in a CATCH22 situation, in order to extract a file you need to ALREADY know BOTH the [Section] where it is encoded AND the actual filename, which means that you have to open in a text editor the actual .script in order to find this data and your eyes (unless you are Ferengi) will be struck by the inane amount of commas, #$c, #$q, #$etc., #$etc..

The attached small batch is intended to help in this.

Here is a "screenshot" :thumbup: :
A parameter is missing or incorrect, you typed:

unwbzip



unwbzip.cmd simple batch to help in using wbzip.exe or wbzip_new.exe

			to extract files embedded in Winbuilder .scripts

			Release ALPHA 0.01 15/March/2010 by jaclaz

			******************************************************

			**paths with spaces in them rigorously NOT supported**

			******************************************************



Usage:

unwbzip <scriptname.script> &#91;options&#93; &#91;<section> <filename>&#93; &#91;TargetDir&#93;



Options&#58;

/L						- List all filenames of files encoded in .script

/LS					   - List all Sections of files encoded in .script

/XA					   - eXtract All files encoded in .script

/XF  <filename>		   - eXtract File <filename> regardless of it&#39;s Section

/XS  <section>			- eXtract All files contained in  <Section> only

/XSF <section> <filename> - eXtract <Filename> from <Section> only

Please find also attached "a" version of wbzip_new.exe, the one I tested the batch with.

As always, no help file given , if the above info is not enough to let you use the batch, it means that you should NOT use it.

Feel free to use, peruse, modify, whatever, released under my Careware License:
http://jaclaz.alterv...s/careware.html

Take it easy, have fun. ;)

:)

Wonko

To this post was attached the first, experimental, pre-alpha release of the batch, to avoid further misunderstandings with people that fail to read a 16 post long thread, I removed it, and it is now replaced by this sentence:

GET LATEST VERSION IN THE LATEST POST IN THIS THREAD WITH AN ATTACHMENT IN THE FORM unwbzipxyz.zip
(hint: unwbzip006 comes LATER than unwbzip004 and this latter comes later than unwbzip003, I hope you get the idea...)

Attached Files



#2 wendy

wendy

    Frequent Member

  • Lady
  • 290 posts
  • Location:one mile from the QR main line
  • Interests:Operating systems, Weights and Measures, Geometry
  •  
    Australia

Posted 18 March 2010 - 08:44 AM

Is it just me or are these links broken?

#3 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 18 March 2010 - 09:35 AM

Is it just me or are these links broken?

It's not just you:
http://www.boot-land...?...c=10788&hl=

Since you have a very good mathematically oriented mind, try to do a UNION:
http://en.wikipedia....on_(set_theory)
with this:
http://www.911cd.net...o...2416&st=125

and see what comes out of it. :)

:thumbup:

Wonko

#4 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 06 April 2010 - 04:31 PM

For no apparent reason, a 0.02 0.03 version.

:whistling:
Wonko

Attached Files



#5 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 06 April 2010 - 04:54 PM

A SINGLE, SMALL SIZED, (stupid) .script for test
http://lancelot.winb...20script_v1.rar

:whistling:

#6 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 06 April 2010 - 07:09 PM

A SINGLE, SMALL SIZED, (stupid) .script for test
http://lancelot.winb...20script_v1.rar

:whistling:

Test version 0.02 0.03.

:blowup:
Wonko

#7 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 06 April 2010 - 08:07 PM

A SINGLE, SMALL SIZED, (stupid) .script for test
http://lancelot.winb...20script_v1.rar

:whistling:

Above bold by me!
"Stupid" seems to be correct!

There is neither a [process] nor any section processed by a button / check box or similar click.
Here the log when processing the script:
lancelotlog.gif
If me as experienced user am too stupid to process the script correctly, and a noob user could process it, I apologize.

Peter

#8 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 07 April 2010 - 05:23 AM

Thanks a lot jaclaz,

now i can even easly extract files from stupid scripts by simple right clicks :whistling: :blowup:

#9 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 07 April 2010 - 06:54 AM

Hi jaclaz,

Here is another test script
http://lancelot.winb.....20test v2.rar

DriverImportPE-eng.htm can not be extracted :whistling:

#10 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 07 April 2010 - 08:04 AM

If me as experienced user am too stupid to process the script correctly, and a noob user could process it, I apologize.


You, as experienced user are ASSUMING that the scope of that .script would have been that of being processed: it is NOT!

Do not assume too much. :ph34r:

DriverImportPE-eng.htm can not be extracted :whistling:



Sure it cannot. :dubbio:
Not having defined a SYNTAX before coding, when the good guys that programmed wbzip did not establish adequately the separator in the:
[Encoded-name_of_file.ext]
and used the "-" or minus sign.
To easen the life of batch writers, they could have used a character never or scarcely used in filenames, like "§" or could have put a Rule like "don't use the minus sign in filenames".

No problem, it only means I have to re-write the parsing routine.

Just to have it clearly put, the file "unwbzip WBZipMgr test v2.rar" is another SINGLE SMALL SIZED (stupid) .script - not intended to be processed at all - for testing purposes ONLY, containing a compressed file with a "minus" in the file name.

:blowup:
Wonko

#11 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 07 April 2010 - 11:20 AM

Hi jaclaz,

I notice one thing, check this one :ph34r:
http://lancelot.winb.....20test v3.rar

an idea if you like:
/XAS
/XFS

S is for subfolder

Above is no issue to me :ph34r: . My personal usage do not have a trouble with this and I love /XA extracting to current folder (as default) even with knowing above thingy :dubbio: .

Btw, v2 test script is inspired by Galapo and v3 inspired by Homes32 posts :whistling:

:blowup:

#12 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 07 April 2010 - 11:48 AM

Version 0.04 (hopefully working with Challenge version v2)

This thing is becoming a quiz game:

Can you find a way to name something so that the batch won't work?


:whistling:

:dubbio:
Wonko

Attached Files



#13 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 07 April 2010 - 12:46 PM

This thing is becoming a quiz game:

http://lancelot.winb...01004071539.jpg


annnnnd here comes the 0.05 question, why following not work on 0.04

:whistling:


/L working
/LS working
/XA not working (but gives list saying all extracted)
/XF not working (and gives result of /L on screen)
/XS not working
/XSF working

test example:
base path: D:\1\2\ (where unwbzip.cmd and wbzip_new.exe exists)
extract "unwbzip WBZipMgr test v2.rar" to base path and renamed to 2.script

D&#58;\1\2>unwbzip 2.script /XA

Source&#58; &#34;D&#58;\1\2\2.script&#34;

Target&#58; &#34;D&#58;\1\2\&#34;



1 - &#34;AuthorEncoded&#34;	 - &#34;dipeico.ico&#34;

2 - &#34;Test Folder&#34;	   - &#34;Test Attach.JPG&#34;

3 - &#34;InterfaceEncoded&#34;  - &#34;Test Interface.JPG&#34;

4 - &#34;InterfaceEncoded&#34;  - &#34;Test Interface Txt.txt&#34;

5 - &#34;html&#34;	  - &#34;DriverImportPE-eng.htm&#34;

6 - &#34;html&#34;	  - &#34;LiveXP.txt&#34;



File &#34;dipeico.ico&#34; -  Extracted succesfully

File &#34;Test Attach.JPG&#34; -  Extracted succesfully

File &#34;Test Interface.JPG&#34; -  Extracted succesfully

File &#34;Test Interface Txt.txt&#34; -  Extracted succesfully

File &#34;DriverImportPE-eng.htm&#34; -  Extracted succesfully

File &#34;LiveXP.txt&#34; -  Extracted succesfully



D&#58;\1\2>dir dipeico.ico

 Volume in drive D is bulubulu

 Volume Serial Number is blabla



 Directory of D&#58;\1\2



File Not Found



D&#58;\1\2>


:dubbio:

#14 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 07 April 2010 - 12:59 PM

annnnnd here comes the 0.05 question, why following not work on 0.04


Well, NO.

That's the problem I left to you to solve :whistling:.

Hint:
look for § characters.....

:dubbio:
Wonko

#15 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 08 April 2010 - 12:22 PM

It's not fun to play alone. :cheers:

However, version 0.06 attached.

:cheers:
Wonko

Attached Files



#16 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 08 April 2010 - 01:05 PM

It's not fun to play alone. :cheers:

Come onnnnn :rofl:

Thanks a lot for 0.06 , to me now %99 perfect :) :) and %100 fits my personal use :) :huh:

Thanks a looooooooooottttttttttttt :cheers: you are a great batcher. :huh:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users