InstEd, rebuild CABs: change MSZip to LZX compression.
InstEd, rebuild CABs: change MSZip to LZX compression.
Is there a way to have InstEd rebuild cabs using LZX compression?
I looked for an option but found nothing.
Is there some small hack to accomplish this or a better way to build the cabs once the msi has been modified?
(I'm trying to learn the ropes of modifying an msi installer with InstEd.)
I looked for an option but found nothing.
Is there some small hack to accomplish this or a better way to build the cabs once the msi has been modified?
(I'm trying to learn the ropes of modifying an msi installer with InstEd.)
"You can lead a horse to water, but you can't make it drink."
You can Hex-edit InstED.exe.
When rebuilding cabs, there is another option: view the ddf file(Show ddf). You can use this option to check what InstED uses to rebuild cabs. Then you just Hex-edit InstED.exe to modify the ddf options.
http://msdn.microsoft.com/en-us/library/bb417343.aspx
BTW, don't ask me for the hack I use because I never use makecab.exe to create a cab containing multiple files so I don't know the ddf switches.
When rebuilding cabs, there is another option: view the ddf file(Show ddf). You can use this option to check what InstED uses to rebuild cabs. Then you just Hex-edit InstED.exe to modify the ddf options.
http://msdn.microsoft.com/en-us/library/bb417343.aspx
BTW, don't ask me for the hack I use because I never use makecab.exe to create a cab containing multiple files so I don't know the ddf switches.
Last edited by yumeyao on Sun Aug 21, 2011 5:58 pm, edited 1 time in total.
I have written a tiny tool to hack insted.exe to change default mszip compression to lzx:21.
You can open this tool directly and it will let you locate the file or you can just pass the file name/path in command line to it.
uue-encoded file:
You can either save the code as *.uue and open it with WinRAR, or copy it to this online decoderwhen using this online decoder, please remove the trailing space of last line (79S,R+F1L;``````````````````````` ) after you copy and paste.
You can open this tool directly and it will let you locate the file or you can just pass the file name/path in command line to it.
uue-encoded file:
You can either save the code as *.uue and open it with WinRAR, or copy it to this online decoderwhen using this online decoder, please remove the trailing space of last line (79S,R+F1L;``````````````````````` ) after you copy and paste.
Code: Select all
begin 644 hackinsted.exe
M35J0``,````$````__\``+@`````````0```````````````````````````
M````````````````````@`````X?N@X`M`G-(;@!3,TA5&AI<R!P<F]G<F%M
M(&-A;FYO="!B92!R=6X@:6X@1$]3(&UO9&4N#0T*)`````````!010``3`$"
M`,6YG4X``````````.```P$+`0@```(````$````````%A$````0````(```
M``!````0`````@``!``````````$```````````P`````@````````(```0`
M`!```!``````$```$````````!```````````````&`B``!D````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````(```/```````````````
M`````````````````````"YT97AT````UP$````0`````@````(`````````
M`````````"```&`N<F1A=&$``/(#````(`````0````$````````````````
M``!```!`````````````````````````````````````````````````````
M``````````````````````!5B^Q145:-1?Q0C47X4(OQ4E;_%2P@0`"+1CR+
M3?R)3#!8,\!`7LG#45%65S/_5VB`````:@-75V@```#`_W0D+(E\)"3_%1@@
M0`"+\(/^_W4)"40D".FR````4U575O\5%"!``%>+Z%57:@175O\5$"!``(O8
M5HE<)!C_%0P@0``[WW4*QT0D$/[____K?%575VH"4_\5""!``(O8.]]U"L=$
M)!#]____ZU9J<UF_0"!``(OP,])F\Z=T$$"-#"N-D.8````[T7;A,\"%P'4*
MQT0D$/S____K(&HY68OXOB@A0`#SI8O5B\MFI>@/____:@!3_Q4$($``4_\5
M`"!``/]T)!3_%0P@0`!=6XM$)`A?7EE9PU6+[('L5`0``%97C47P4&H`C47L
M4(U%_%"-1?A0OC@B0`#_%30@0`"#Q!2#??@"?0>^3")``.LEBT7\_W`$Z,_^
M__^#^/]9B47T=6N#??@"=`N+1?R+0`B`.'%T6FH5,\!9C7V8\ZN-A:S[__^)
M1;`S_XU%E$=0QT646````,=%H!`B0`")?:S&A:S[__\`QT6TZ`,``(EUQ,=%
MR``8``#_%20@0``[QW4-C86L^___4.A<_O__6?]U]/\5'"!``,P`````````
M```````````````````````````````````````````````C```2(P``)",`
M`#0C``!"(P``6",``&8C``!T(P```````-`C````````D",```````"T(P``
M```````````@`#L`(`!!`&P`;``@`&,`80!B`&D`;@!E`'0`<P`@`&<`;P`@
M`&D`;@`@`&$`(`!S`&D`;@!G`&P`90`@`&0`:0!R`&4`8P!T`&\`<@!Y``T`
M"@``````+@!3`&4`=``@`$,`;P!M`'``<@!E`',`<P!I`&\`;@!4`'D`<`!E
M`#T`30!3`%H`20!0`#L`*@`J`"``00!L`&P`(`!F`&D`;`!E`',`(`!A`'(`
M90`@`&,`;P!M`'``<@!E`',`<P!E`&0`(`!I`&X`(`!C`&$`8@!I`&X`90!T
M`"``9@!I`&P`90!S````#0`*`"X`4P!E`'0`(`!&`&\`;`!D`&4`<@!3`&D`
M>@!E`%0`:`!R`&4`<P!H`&\`;`!D`#T`-``R`#D`-``Y`#8`-P`R`#D`-0`@
M`#L`30`-``H``````"X`4P!E`'0`(`!#`&\`;0!P`'(`90!S`',`:0!O`&X`
M5`!Y`'``90`]`$P`6@!8``T`"@`N`%,`90!T`"``0P!O`&T`<`!R`&4`<P!S
M`&D`;P!N`$T`90!M`&\`<@!Y`#T`,@`Q`"``.P`@`"``0@!E`',`=``@`$,`
M;P!M`'``<@!E`',`<P!I`&\`;@```$EN<W1%9"YE>&4`26YS=$5D+F5X90!!
M;&P@1FEL97,`*BXJ``````!#86XG="!L;V-A=&4@9FEL92$A(%!L96%S92!3
M96QE8W0@1FEL90``Q"(`````````````@B,````@``#P(@````````````"F
M(P``+"```/@B`````````````,0C```T(```Z"(`````````````Y",``"0@
M```````````````````````````````C```2(P``)",``#0C``!"(P``6",`
M`&8C``!T(P```````-`C````````D",```````"T(P```````&4#56YM87!6
M:65W3V9&:6QE`.<`1FQU<VA6:65W3V9&:6QE`%X"36%P5FEE=T]F1FEL90`N
M`$-L;W-E2&%N9&QE`$X`0W)E871E1FEL94UA<'!I;F=!``!;`4=E=$9I;&53
M:7IE`$T`0W)E871E1FEL94$`KP!%>&ET4')O8V5S<P!K97)N96PS,BYD;&P`
M``(`0VAE8VM3=6U-87!P961&:6QE``!I;6%G96AL<"YD;&P``&T`7U]G971M
M86EN87)G<P!M<W9C<G0N9&QL```)`$=E=$]P96Y&:6QE3F%M94$``&-O;61L
79S,R+F1L;```````````````````````
`
end
Last edited by yumeyao on Tue Oct 18, 2011 9:03 pm, edited 1 time in total.
@YumeYao, I used both of the methods you suggested and came up with slightly different files.
1) Copy to online decoder then save to local file
hackinsted.exe
Size: 2,025 bytes
CRC32: D3A5F4DB
MD5: AA32F678A0D6ABF5395909889C82BFFD
SHA-1: 152E63B906F29A74BB752109A863D5FE02B64F91
2) Copy to hackinsted.uue, open with WinRAR, and extract to local file
hackinsted.exe
Size: 2,048 bytes
CRC32: 07C52F78
MD5: F7E3F648BDA4D910D5BF748529C48EDD
SHA-1: 677A3234F7E264E174F9F4805004AC8F7826172F
(1) did not run and gave an error that it was not a valid Win32 application. (2) seemed to work correctly. So I must have not done something right when I tried method (1), but method (2) works well.
Thanks for this.
Cheers and Regards
1) Copy to online decoder then save to local file
hackinsted.exe
Size: 2,025 bytes
CRC32: D3A5F4DB
MD5: AA32F678A0D6ABF5395909889C82BFFD
SHA-1: 152E63B906F29A74BB752109A863D5FE02B64F91
2) Copy to hackinsted.uue, open with WinRAR, and extract to local file
hackinsted.exe
Size: 2,048 bytes
CRC32: 07C52F78
MD5: F7E3F648BDA4D910D5BF748529C48EDD
SHA-1: 677A3234F7E264E174F9F4805004AC8F7826172F
(1) did not run and gave an error that it was not a valid Win32 application. (2) seemed to work correctly. So I must have not done something right when I tried method (1), but method (2) works well.
Thanks for this.
Cheers and Regards
Excellent idea.yumeyao wrote:I was planning to include this patch on my switchless installer so that user could choose whether enable it or not. That's why I wrote this.
Instead of copy and pasting, I uploaded the text file to that site and downloaded the binary--which worked for me.bphlpt wrote:1) Copy to online decoder then save to local file
"You can lead a horse to water, but you can't make it drink."
I have verified that this works correctly. Paste the code, delete the extra space, click decode, then save. To me saving the text locally as hackinsted.uue and expanding with WinRAR is easier, but now either way will work.yumeyao wrote:(1) will work if you remove the trailing space of last line (79S,R+F1L;``````````````````````` ) after you copy and paste.
Cheers and Regards
I have verified that the tool works correctly with version 1.5.13.24.
I did this by extracting the the contents of the stock 7z922.msi, replacing the stock files with yy's MSVC compiled versions, then making the necessary adjustments with InstEd, re-building the cabs, and saving the new msi. Then installed successfully and checked in VBox. Opening the created msi with 7z shows it was compressed with LZX21.
Thanks again, yy.
I did this by extracting the the contents of the stock 7z922.msi, replacing the stock files with yy's MSVC compiled versions, then making the necessary adjustments with InstEd, re-building the cabs, and saving the new msi. Then installed successfully and checked in VBox. Opening the created msi with 7z shows it was compressed with LZX21.
Thanks again, yy.
"You can lead a horse to water, but you can't make it drink."
quote yumeyao,
I merely used the msi to quickly test the functionality of the tool you posted.
I had been using version 16 of InstEd.exe you posted further above to learn about modifying msi's and had used the 7z22.msi as my first study case almost two months ago. So, it was quick and easy for me to test the tool with it.
I do use the exe, as I prefer it to msi installations.why not use my 7z922.exe directly?
I merely used the msi to quickly test the functionality of the tool you posted.
I had been using version 16 of InstEd.exe you posted further above to learn about modifying msi's and had used the 7z22.msi as my first study case almost two months ago. So, it was quick and easy for me to test the tool with it.
"You can lead a horse to water, but you can't make it drink."