
The code in the .rc part was written by HAT, with some help from slore. Thanks!
Test Environment: Windows XP SP2
Tools Used: ResHacker.exe、GoRC.exe
Principle: ResHacker.exe modifies and replaces explorer.exe from the command line
Execution Process: 1. ResHacker.exe extracts the 37th StringTable of explorer.exe as a .rc file
2. The user enters new button text (i.e., modifies the .rc file)
3. GoRC.exe compiles the .rc into a .res file
4. End the explorer.exe process, rename explorer.exe in dllcache to have a .backup suffix
5. ResHacker.exe uses the .res file to overwrite and modify explorer.exe
6. Start explorer
Tip: If you don't enter text and just press Enter, you can remove the "Start" button
ScreenshotModify.bat
::@ http://www.cn-dos.net/forum/viewthread.php?tid=42775
@echo off
setlocal enabledelayedexpansion
If not exist st37.rc (ResHacker.exe -extract %windir%\explorer.exe,st37.rc,stringtable,37,)
set count=0
set newname=
set /p newname=Please enter:
type nul>"st37.bak"
for /f "tokens=1,2* delims=:" %%a in ('findstr /n .* "st37.rc"'
do (
>>"st37.bak" echo.%%b
set /a count+=1
if !count! equ 4 goto :next
)
goto :eof
:next
>>"st37.bak" echo 578, "%newname%"
for /f "skip=5 tokens=1,2* delims=:" %%a in ('findstr /n .* "st37.rc"'
do (
>>"st37.bak" echo.%%b
)
move /y "st37.bak" "st37.rc"
gorc.exe /r st37.rc
taskkill /im explorer.exe /f
set dllcache=%windir%\system32\dllcache
If not exist %dllcache%\explorer.backup ren %dllcache%\explorer.exe explorer.backup
If not exist %windir%\explorer_backup\explorer.exe (
md %windir%\explorer_backup
copy %windir%\explorer.exe %windir%\explorer_backup
)
ResHacker.exe -modify %windir%\explorer.exe,%windir%\explorer.exe,st37.res,stringtable,,
start explorerRestore.bat
@echo off
pause
taskkill /im explorer.exe /f
replace %windir%\explorer_backup\explorer.exe %windir%
ren %windir%\system32\dllcache\explorer.backup explorer.exe
rd /s /q %windir%\explorer_backup
start explorerDownload Link: http://upload.cn-dos.net/img/780.rar
Download Link 2: http://www.brsbox.com/filebox/down/fc/6870f67f2ec08e5a8ab85283b314d7d9
-------------------------------------------------------------------------------------------------------
The above modification method directly modifies the system's explorer.exe. There is another modification method - load another directory's explorer.exe and modify the shell value in the registry to point to this explorer.exe. Jump to Floor 14
[ Last edited by tireless on 2008-9-21 at 08:49 PM ]

