13 August 2011

7zsfx with dirid

I build custom 7zip SFX with complete DIRID <-> CSIDL conversion
binary is based on 1.500.2100 beta branch, browse here -> http://svn.7zsfx.info

with this conversion (see stickies here) I can use for example:
proper registry injection:
reg add HKLM\bla\bla /v configfile /t REG_SZ /d "%16412%\something.txt"
service creation:
sc create daemon binpath= %11%\something.sys type= kernel start= boot DisplayName= blablabla
or any proper file operation... therefore could no longer rely on inf script

module already have elevation mode through MiscFlags="4" and waitall: prefix, but I disable crypto function (can't build it)


Just the time I upload binaries, I realise that the sfx actually linked to winsxs dll hell of msvcr90.dll WTF! so i recall those crap files...
I'm using Visual Studio Express 2008 SP1 apparently it's still possible to link using only msvcrt.dll. What you need is WDK 7 (Windows Driver Kit not Windows Development Kit) then look for this file: libs_x86fre_cab001.cab

Open with 7zip then look for msvcrt.lib and one of these files (depend how old the Windows you want to support) :

rename your VC\lib\msvcrt.lib to something else and copy above static lib there
then inside Visual Studio press Alt+F7 -> Linker -> commandline : append your preferred obj into "additional options" box
Build! you should get sfx that linked with msvcrt.dll only


No comments:

Post a Comment