China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-11 03:36
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Share]Quickly Modify the Text of the "Start" Button View 2,708 Replies 15
Original Poster Posted 2008-09-10 03:08 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline


The code in the .rc part was written by HAT, with some help from slore. Thanks!

Test Environment: Windows XP SP2
Tools Used: ResHacker.exeGoRC.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 Screenshot

Modify.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 explorer


Restore.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 explorer


Download 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 ]
Recent Ratings for This Post ( 3 in total) Click for details
RaterScoreTime
HAT +10 2008-09-10 10:23
radem +2 2008-09-10 13:23
moniuming +8 2008-09-10 13:39
Floor 2 Posted 2008-09-10 06:58 ·  中国 江苏 苏州 电信
初级用户
★★
Credits 195
Posts 93
Joined 2006-10-28 08:20
19-year member
UID 68626
Gender Male
Status Offline
ResHacker.exe has a command-line interface, oh - -! Just found out
Floor 3 Posted 2008-09-10 09:33 ·  中国 广东 东莞 电信
中级用户
★★
Credits 387
Posts 104
Joined 2004-11-19 00:00
21-year member
UID 33813
Gender Male
Status Offline
Not bad, modifying resources can also be done via command line, excellent
Floor 4 Posted 2008-09-10 10:23 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Learning
Floor 5 Posted 2008-09-10 11:53 ·  中国 上海 上海地面通信息网络有限公司
中级用户
★★
Credits 240
Posts 115
Joined 2008-03-10 19:31
18-year member
UID 112561
Gender Male
Status Offline
After running it, Kingsoft PowerWord has an error and can't be opened at all.
Floor 6 Posted 2008-09-10 12:14 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
Originally posted by terrytong at 2008-9-9 03:53 PM:
After running it, Kingsoft Ciba (Kingsoft Dictionary) has an error and can't be opened at all.

It may be due to restarting explorer.exe.
Floor 7 Posted 2008-09-10 12:32 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
It is still suggested to modify the shell by changing the registry... It is convenient to restore and does not replace the original system files.
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
Floor 8 Posted 2008-09-10 13:21 ·  中国 广东 韶关 电信
高级用户
★★★
CMD感染者
Credits 691
Posts 383
Joined 2008-05-23 00:38
18-year member
UID 119451
Gender Male
Status Offline
Support original work

modify startbutton text.rar
Floor 9 Posted 2008-09-11 23:10 ·  中国 浙江 台州 电信
新手上路
Credits 19
Posts 8
Joined 2008-09-11 16:52
17-year member
UID 125412
Gender Male
Status Offline
I see your last restored batch processing, it seems that you just deleted that registry, but didn't restore it to the original value! This will cause an error when restarting!
Floor 10 Posted 2008-09-11 23:27 ·  中国 江西 赣州 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
Originally posted by ggaking at 2008-9-11 03:10 AM:
Seeing your last restored batch file, it seems that you just deleted that registry but didn't restore it to the original value. This will cause an error when restarting!

I don't remember if there was originally that "shell" value. I tried it and there's no error.
Floor 11 Posted 2008-09-12 23:02 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
By default, it's said that explorer.exe can't be deleted
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
Floor 12 Posted 2008-09-14 11:19 ·  中国 浙江 宁波 电信
新手上路
Credits 8
Posts 4
Joined 2008-09-13 11:57
17-year member
UID 125543
Gender Male
Status Offline
Floor 13 Posted 2008-09-14 11:19 ·  中国 浙江 宁波 电信
新手上路
Credits 8
Posts 4
Joined 2008-09-13 11:57
17-year member
UID 125543
Gender Male
Status Offline
Okay, forgot to mention it.
Floor 14 Posted 2008-09-22 16:47 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
Modify .bat
@echo off
::@ http://www.cn-dos.net/forum/viewthread.php?tid=42775
If not exist st37.rc (ResHacker.exe -extract %windir%\explorer.exe,st37.rc,stringtable,37,)
setlocal enabledelayedexpansion
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

If not exist %windir%\CustomStartButton\ md %windir%\CustomStartButton\

taskkill /im explorer.exe /f

ResHacker.exe -modify %windir%\explorer.exe,%windir%\CustomStartButton\explorer.exe,st37.res,stringtable,,

reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /d %windir%\CustomStartButton\explorer.exe /f

start %windir%\CustomStartButton\explorer.exe


Restore .bat
@echo off
pause
reg delete "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /f
taskkill /im explorer.exe /f
rd /s /q %windir%\CustomStartButton
start explorer


Download address: http://upload.cn-dos.net/img/781.rar
Download address 2: http://www.brsbox.com/filebox/down/fc/be99982f13243d6129bbffe4888e1e8a

[ Last edited by tireless on 2008-9-21 at 08:48 PM ]
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
moniuming +8 2008-09-24 17:29
Floor 15 Posted 2008-09-24 17:30 ·  中国 广东 广州 广东金万邦科技投资有限公司(新一代数据中心)IDC机房(BGP)
银牌会员
★★★
永远的菜鸟
Credits 1,335
Posts 574
Joined 2007-11-27 12:50
18-year member
UID 103929
Gender Male
From 广西
Status Offline
Good stuff, keep it up!!!
Forum Jump: