26

(32 replies, posted in Feature Requests)

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.

27

(32 replies, posted in Feature Requests)

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!

28

(32 replies, posted in Feature Requests)

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

29

(32 replies, posted in Feature Requests)

Ok people I present you with two options.

the first option just uses a bitmap image while extracting and it works

http://www.ryanvm.net/forum/viewtopic.php?t=3477

Slight problem is after install the bitmap remains as the desktop background. Easily fixable. (I replace the .bmp at the end of presetup.cmd)


The second option is use a self extracting 7zip archive. It works awsome and displays a progress bar during extraction.

create the self extracting archive with 7zip. (it will now have a .exe extension not .7z)

use the following code in your presetup.cmd file

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

each archive will extract with it's own progress bar.

To get rid of the cancel button and add a text line, reshack dialog 500 with this code, compile and save. (you can modify the "Extracting My..." line to your desire)

500 DIALOG 0, 0, 170, 30
STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_CENTER | WS_POPUP
CAPTION "Extracting"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 10, "MS Shell Dlg"
{
   CONTROL "Extracting My Hardware Drivers", 99, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE, 20, 1, 150, 8
   CONTROL "Progress1", 1000, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 5, 12, 160, 13
}


I use both methods and it looks awsome.

Sure reshacking the files after creating the archives can be a pain if you have many archives but with some batch files and .res files it becomes easy.

cheers all