Re: [Done:] Yet Another SPLASH-screen

After a bit of messing around I managed to make a batch file to automatically make the self extracting archives.

Each archive when extracting will show the dialog "extracting 1 of 10 > DP_.........."

It does a dir of the folder and makes a list of all the .7z files.
It counts how many there are.
It creates a resource script based on archive number and name.
It compiles the script (.rc) to a resource file (.res)
It reshacks the custom.sfx file with the updated dialog (.res file).
It then creates the .exe archive.

There will be a better way to do this but I give you this as an example.

put the batch file in the folder with your .7z files.
create a folder called "bin".
in that put
ResHacker.exe
7z.sfx from your 7zip program files folder (rename to custom.sfx)
gorc.exe (used to compile the .rc file to a .res file)

get gorc.exe from
http://www.jorgon.freeserve.co.uk/ResourceFrame.htm

batchfile.bat

@echo off

set x=1
set z=0

dir /b /a-d DP_*.7z > temp.txt
for /F "tokens=* delims=	" %%h in (temp.txt) do call :count
for /F "tokens=* delims=	" %%J in (temp.txt) do call :sub %%J

del /q temp.txt
del /q bin\ResHacker.ini
del /q bin\ResHacker.log

goto :eof
:sub

>diag.rc echo 500 DIALOG 0, 0, 195, 30
>>diag.rc echo STYLE DS_FIXEDSYS ^| DS_MODALFRAME ^| DS_CENTER ^| WS_POPUP
>>diag.rc echo CAPTION "Extracting"
>>diag.rc echo LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
>>diag.rc echo FONT 10, "MS Shell Dlg"
>>diag.rc echo {
>>diag.rc echo    CONTROL "Extracting %x% of %z% > %~n1", 69, STATIC, SS_LEFT ^| WS_CHILD ^| WS_VISIBLE, 5, 2, 185, 8 
>>diag.rc echo    CONTROL "Progress1", 1000, "msctls_progress32", PBS_SMOOTH ^| WS_CHILD ^| WS_VISIBLE ^| WS_BORDER, 5, 12, 185, 13 
>>diag.rc echo }

bin\gorc.exe /r diag.rc
bin\ResHacker.exe -addoverwrite bin\custom.sfx, bin\custom.sfx, diag.res,,,

copy /b bin\custom.sfx + %~nx1 %~n1.exe

del /q diag.rc
del /q diag.res

set /A x=%x%+1

goto :eof

:count
set /A z=%z%+1
goto :eof

use the following code in your presetup.cmd file

FOR %%h IN (%CDDRIVE%\OEM\Drivers\*.exe) DO "%%h" x -y -aoa -o"%SystemDrive%"

Try it out
ciao

Last edited by jaws1975 (2006-11-20 09:12:24)

27

Re: [Done:] Yet Another SPLASH-screen

verry nice script. but but when i looked a bit closer at the driver-pack  base,  it works just a bit diferend...
(thus making your scrup un-usefulll ... ) because the driverpack base itself already toutches the driverpacks... and murging them in new order...   so after the dpbase  takes a file and creates a new one its litle work to just  copy $file + 7zip.custom.sfx  newfile.exe ....

but i do like your script.. it looks nice...  cleans up its mess and is code neatly...

disclaimer:
Any posts written by me or on my behalf comes strictly with no implicit warenty unless clearly stated otherwise.
Following any advise i might give, is done soly at one's own risk.
Never give away person-identifiable information about yourself unless you absolutely know for sure you can trust the person you give it to...

Re: [Done:] Yet Another SPLASH-screen

Anyway you want to use it is fine by me.
The reason for the script is to dynamically change the dialog in the archives so it will say...

Extracting 1 of 10 > DP_Chipset_wnt5_x86-32_6091

Extracting 2 of 10 > DP_CPU_wnt5_x86-32_6091

etc.....

It will say whatever the file name is of the .7z file you converted.

That way you don't have to Reshack each file to change the dialog or have all of them say the same thing.

anyway... I posted this on MSFN and will update that page. So check there for updates and tweaks to it.

http://www.msfn.org/board/index.php?showtopic=86991

good luck!

Re: [Done:] Yet Another SPLASH-screen

Very interesting approach, I must say. Too bad it involves recompressing the DriverPacks, which makes it (at least at first sight) an undesirable approach to me.

I will keep you guys here updated on the progress made with "my" improved presetup. If someone of you would like to be member of the Code Team, just let me know wink

Founder of DriverPacks.net — wimleers.com

Re: [Done:] Yet Another SPLASH-screen

My batch file DOES NOT recompress the driver packs. It only adds the .sfx module via the copy command.
It runs as fast as your computer can copy a file.
Very fast on my PC.

31

Re: [Done:] Yet Another SPLASH-screen

btw, strangely enought i cant even find a comand string in the 7z.sfx  that support   comandline argumented text.

for example   

example_7z.exe /q x /d"c:\temp\" /text "extracting example_7z [1 of 5]"

or something like that...

disclaimer:
Any posts written by me or on my behalf comes strictly with no implicit warenty unless clearly stated otherwise.
Following any advise i might give, is done soly at one's own risk.
Never give away person-identifiable information about yourself unless you absolutely know for sure you can trust the person you give it to...

Re: [Done:] Yet Another SPLASH-screen

-I- wrote:

btw, strangely enought i cant even find a comand string in the 7z.sfx  that support   comandline argumented text.

for example   

example_7z.exe /q x /d"c:\temp\" /text "extracting example_7z [1 of 5]"

or something like that...

True. You'll have to hexedit the .sfx file and save it as "custom.sfx" or something like that. After that, you don't have to modify it manually anymore.

Founder of DriverPacks.net — wimleers.com

33

Re: [Done:] Yet Another SPLASH-screen

i was more or less thingking about,  supmitting it as feature request as it is rather stupid that it isn't implemented yet.
(for a real programmer, its no more that, addin 1 exta  function call to check for,  (almost an exact copy op the target function -  just with other variables ... and ofcaurce a dif handle after the var is set ... (if only it was in kyx / delphi or basic - id be able to do this in an hour... )....

- but in the mean time yea it is for now just a matter of,  hex-editing it...  (1 for every dp)....

disclaimer:
Any posts written by me or on my behalf comes strictly with no implicit warenty unless clearly stated otherwise.
Following any advise i might give, is done soly at one's own risk.
Never give away person-identifiable information about yourself unless you absolutely know for sure you can trust the person you give it to...