Jump to content











Photo
- - - - -

Expand bug


  • Please log in to reply
13 replies to this topic

#1 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 04 March 2010 - 07:29 AM

Seems the 'Expand' command has troubles with some files.

This extracts a file that is 18mb in size:
Expand,%source_sys%\%spCabFile%,%Target_Sys%\drivers\rtl8139.sys

However, this extracts the proper sized file that is 21kb:
ShellExecute,Hide,"expand.exe","#$q%source_sys%\%spCabFile%#$q -F:rtl8139.sys #$q%target_sys%\drivers#$q"

Is this reproducable?

Thanks,
Galapo.

#2 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 04 March 2010 - 07:31 AM

Maybe I have the wrong syntax. I added a CAB extention to the 18mb rtl8139.sys. The entire %spCabFile% was copied as it opened in my archive program.

Thanks,
Galapo.

#3 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 04 March 2010 - 11:52 AM

Ok, after some trial and error I realise that the file to be extracted needs to be supplied as third parameter.

WB wand currently provides only this for expand command:
Expand,CABfile,DirToDecompress

This is quite minimalistic, so I suggest the more helpful:
Expand,CABfile,DirToDecompress[,filename,PRESERVE,NOWARN]

Thanks,
Galapo.

#4 pscEx

pscEx

    Platinum Member

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

Posted 04 March 2010 - 05:54 PM

Ok, after some trial and error I realise that the file to be extracted needs to be supplied as third parameter.

WB wand currently provides only this for expand command:

Expand,CABfile,DirToDecompress

This is quite minimalistic, so I suggest the more helpful:
Expand,CABfile,DirToDecompress[,filename,PRESERVE,NOWARN]

Thanks,
Galapo.

Expand only expands a single cab file into a directory.
See http://winbuilder.ne...tax.html#Expand

If you want to use a single file of the cab (like in your proposal), use
Magic wand: CopyOrExpand,FileToCopyOrExpand,DestinationFolderOrFilename[,PRESERVE[,NOWARN]]
See http://winbuilder.ne...ml#CopyOrExpand

Sample:
CopyOrExpand,%source_win%\%spCabFile%,%target_sys%\NTKRNLMP.EXE

Peter

#5 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 04 March 2010 - 07:59 PM

Expand only expands a single cab file into a directory.

Thant not entirely accurate. Better to say: currently by default, expand expands the contents of a cab file into a directory.

However, expand can also optionally expand a single from a cab file with multiple other files. Therefore, WB magic wand could flag this a optional by providing this:

Expand,CABfile,DirToDecompress[,filename,PRESERVE,NOWARN]

Optional parameters given in brackets.

Thanks,
Galapo.

#6 pscEx

pscEx

    Platinum Member

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

Posted 04 March 2010 - 08:38 PM

Thant not entirely accurate. Better to say: currently by default, expand expands the contents of a cab file into a directory.

However, expand can also optionally expand a single from a cab file with multiple other files. Therefore, WB magic wand could flag this a optional by providing this:

Expand,CABfile,DirToDecompress[,filename,PRESERVE,NOWARN]

Optional parameters given in brackets.

Thanks,
Galapo.

Sorry, I'm sad
I wrote a reply for half an hour, and when I tried to upload, ?????, ?????, Crash

Therefore shortly:
Expand CANNOT do what you suggest and will never do.
CopyOrExpand does all what you suggest.
I currently also do not feel motivated to provide the links to the help pages.
I'm sure you'll find them quickly (provided the Boot-land server .....)

Please excuse me that I do not explain everything again to give it to the f... forums's software to "I?? error" or similar.

Peter

#7 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 04 March 2010 - 08:54 PM

Expand CANNOT do what you suggest and will never do.

Well, log says differently and file is successfully extracted:
Expand,%source_sys%\%spCabFile%,%Target_Sys%\drivers,rtl8139.sys

[Success] Expand - Copied [J:\I386\SP2.cab] to: [%BaseDir%\Target\LiveXP\I386\System32\drivers\]

[Done] LiveXP

[Clock] Script time: 2 seconds and 906 miliseconds

[Done] Script has been sucessfully processed!

Attached File  2010_03_05_065650.png   1.75KB   6 downloads

Regards,
Galapo.

#8 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 04 March 2010 - 09:00 PM

for me the above slightly modded code:
CopyOrExpand,%source_win%\%spCabFile%,%targetdir%\rtl8139.sys

simply copy the file SP3.CAB to %targetdir% renaming it to 'rtl8139.sys'
(doesn't extract anything)


EDIT:
Galapo's code works for me too
Expand,%source_win%\%spCabFile%,%targetdir%,rtl8139.sys
rtl8139.sys is extracted correctly from SP3.CAB

#9 pscEx

pscEx

    Platinum Member

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

Posted 04 March 2010 - 09:15 PM

Well, log says differently and file is successfully extracted:

Expand,%source_sys%\%spCabFile%,%Target_Sys%\drivers,rtl8139.sys

Attached File  2010_03_05_065650.png   1.75KB   6 downloads

Regards,
Galapo.

I'm sure you looked into the docs about Expand and CopyOrExpand :whistling:
About your publication of a bug in WB:
I did not recognize failure of any of the mentioned commands.

But PLEASE: Do not, as already done: Use a bug in any non-stable version, to demand Compatibility.

Here you SURELY use the wrong command. And if it works (all commands are recognized and bring a result) the way you waits for:
Maybe tomorrow there isw a better syntax check and it will not work any more.

And then, like known:
"In version xyz beta ßßß it worked!"
I demand backward compatibility!

You demand?
I say "Stupidity" (For you as my friend "Not really recognized the background")

Peter :cheers:

#10 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 04 March 2010 - 09:23 PM

Peter, take it easy :cheers::
http://winbuilder.ne...tax.html#Expand

Expand

Expand,<CABfile>,<DirToDecompress>
This command will decompress all files inside CABfile to the folder you specify.

Cabinet files usually use extension .CAB

Syntax example:
Expand,c:\MyPath\MyFile.cab,c:\MyNewPath

In this example Expand will try to expand all files found inside c:\MyPath\MyFile.cab to the folder c:\MyNewPath
WB078 added:
A single file can be extracted from the cab file, by giving it's name as third parameter

Syntax example:
Expand,c:\MyPath\MyFile.cab,c:\MyNewPath,YourFile.dll

Expand of a single file gives a warning in the log, if the destination file already exists.
If there is a parameter PRESERVE added, Expand of a single file does not overwrite an existing file. A warning is still given
The warning can be suppressed by an additional parameter NOWARN


The parameters PRESERVE, and NOWARN can be used simultaneously. The order does not matter.


:whistling:

Wonko

#11 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 04 March 2010 - 09:29 PM

Peter, please read my posts more carefully!

I was mislead by the WB magic wand and so was using incorrect syntax to extract a file from a CAB file. Using correct syntax reveals there is no bug, as my previous posts have indicated. All I am suggesting is that the magic wand gives more full syntax option so there's less confusion.

See Wonko's:

WB078 added:
A single file can be extracted from the cab file, by giving it's name as third parameter

Syntax example:
Expand,c:\MyPath\MyFile.cab,c:\MyNewPath,YourFile.dll


Magic wand currently only provides this:
Expand,CABfile,DirToDecompress

Means you have to go and read up help files to actually understand that there is more complete syntax. My suggestion is that why not provide this as currently with CopyOrExpand?
CopyOrExpand,FileToCopyOrExpand,DestinationFolderOrFilename[,PRESERVE[,NOWARN]]

So Expand would become:
Expand,CABfile,DirToDecompress[,filename,PRESERVE,NOWARN]

Thanks,
Galapo.

#12 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 04 March 2010 - 09:34 PM

You demand?
I say "Stupidity" (For you as my friend "Not really recognized the background")

Sorry, I'm not sure what you're meaning. I assume you've read the help file you linked to which explicitly state what you've been saying is impossible is possible?

WB078 added:
A single file can be extracted from the cab file, by giving it's name as third parameter

Syntax example:
Expand,c:\MyPath\MyFile.cab,c:\MyNewPath,YourFile.dll


Regards,
Galapo.

#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 04 March 2010 - 09:53 PM

@psc

you need to update wand of winbuilder, you always write "wand" is the first place to look, but you do not update "wand" which cause confusions.
wand says:

Expand,CABfile,DirToDecompress

and obviously to expand single file from cab file , lines like following used in the past

Expand,%source_sys%\%spCabFile%,%Target_Sys%\drivers\rtl8139.sys

and there came no objection from any development !!!!

LATTTEEEERRRRR

syntax page says,

WB078 added:
A single file can be extracted from the cab file

:whistling: :cheers:
which was already existed !!!!!!!!!!!!

advice:
update wand for the next wb version, and STOP making silent changes (if you can).

further:
i do not care, it is obvious development again made silent changes to force us check expand lines to fix. Which i sadly get used to for a while. Anyway at least we have a working winbuilder, nothing can disturb my hapiness.

#14 pscEx

pscEx

    Platinum Member

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

Posted 05 March 2010 - 08:17 AM

Sorry I did not understand that the magic wand was meant. :whistling:

Will be added.

Peter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users