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)