中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-08-11 02:41
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [分享]快速修改「开始」按钮文字 查看 2,702 回复 15
楼 主 [分享]快速修改「开始」按钮文字 发表于 2008-09-10 03:08 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
积分 2,025
发帖 1,122
注册 2007-09-05 20:15
18年会员
UID 96653
性别 男
状态 离线


修改 .rc 部分的代码由 HAT 编写,还有 slore 提供的一些帮助,谢谢!

测试环境:Windows XP SP2
所用工具ResHacker.exeGoRC.exe
原理ResHacker.exe 在命令行下修改、替换 explorer.exe
执行过程1.ResHacker.exe 提取 explorer.exe 的 37 号 StringTable 为 .rc 文件
2.用户输入新的按钮文字(即修改 .rc 文件)
3.GoRC.exe 编译 .rc 为 .res 文件
4.结束 explorer.exe 进程、重命名 dllcache 下的 explorer.exe 为 .backup 后缀
5.ResHacker.exe 使用 .res 文件覆盖修改 explorer.exe
6.Start explore
r
技巧:不输入文字,直接回车,可以移除「开始」按钮 截图

修改.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=请输入:
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


恢复.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


下载地址: http://upload.cn-dos.net/img/780.rar
下载地址2: http://www.brsbox.com/filebox/down/fc/6870f67f2ec08e5a8ab85283b314d7d9

-------------------------------------------------------------------------------------------------------
以上修改方法是直接修改系统的 explorer.exe。还有另一种修改方法------ 加载另一个目录的 explorer.exe,修改注册表中的 shell 值指向这个 explorer.exe。跳至 14 楼

[ Last edited by tireless on 2008-9-21 at 08:49 PM ]
本帖最近评分记录 (共 3 条) 点击查看详情
评分人分数时间
HAT +10 2008-09-10 10:23
radem +2 2008-09-10 13:23
moniuming +8 2008-09-10 13:39
2 发表于 2008-09-10 06:58 ·  中国 江苏 苏州 电信
初级用户
★★
积分 195
发帖 93
注册 2006-10-28 08:20
19年会员
UID 68626
性别 男
状态 离线
ResHacker.exe 有命令行接口啊- -!才知道
3 发表于 2008-09-10 09:33 ·  中国 广东 东莞 电信
中级用户
★★
积分 387
发帖 104
注册 2004-11-19 00:00
21年会员
UID 33813
性别 男
状态 离线
不错,改资源也可以命令行,高
4 发表于 2008-09-10 10:23 ·  美国 惠普HP
版主
★★★★★
积分 9,023
发帖 5,017
注册 2007-05-31 19:39
19年会员
UID 89899
性别 男
状态 离线
学习了
5 发表于 2008-09-10 11:53 ·  中国 上海 上海地面通信息网络有限公司
中级用户
★★
积分 240
发帖 115
注册 2008-03-10 19:31
18年会员
UID 112561
性别 男
状态 离线
运行了之后怎么金山词霸就出错了,怎么也打不开了。
6 发表于 2008-09-10 12:14 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
积分 2,025
发帖 1,122
注册 2007-09-05 20:15
18年会员
UID 96653
性别 男
状态 离线
Originally posted by terrytong at 2008-9-9 03:53 PM:
运行了之后怎么金山词霸就出错了,怎么也打不开了。

可能是由于重启了 explorer.exe 的缘故。
7 发表于 2008-09-10 12:32 ·  中国 陕西 西安 电信
铂金会员
★★★★
积分 5,212
发帖 2,478
注册 2007-02-08 23:39
19年会员
UID 79003
性别 男
状态 离线
还是建议改注册表修改shell……还原方便还不替换系统原文件。
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
8 发表于 2008-09-10 13:21 ·  中国 广东 韶关 电信
高级用户
★★★
CMD感染者
积分 691
发帖 383
注册 2008-05-23 00:38
18年会员
UID 119451
性别 男
状态 离线
支持原创

modify startbutton text.rar
9 发表于 2008-09-11 23:10 ·  中国 浙江 台州 电信
新手上路
积分 19
发帖 8
注册 2008-09-11 16:52
17年会员
UID 125412
性别 男
状态 离线
看到你最后一个恢复的批处理,好象就是将那个注册表删除了,却没有恢复为原来的值啊,这样重新启动要出错的呀!
10 发表于 2008-09-11 23:27 ·  中国 江西 赣州 电信
银牌会员
★★★★
积分 2,025
发帖 1,122
注册 2007-09-05 20:15
18年会员
UID 96653
性别 男
状态 离线
Originally posted by ggaking at 2008-9-11 03:10 AM:
看到你最后一个恢复的批处理,好象就是将那个注册表删除了,却没有恢复为原来的值啊,这样重新启动要出错的呀!

我也不记得默认有没有那个“shell”值。我试过了,不会出错。
11 发表于 2008-09-12 23:02 ·  中国 陕西 西安 电信
铂金会员
★★★★
积分 5,212
发帖 2,478
注册 2007-02-08 23:39
19年会员
UID 79003
性别 男
状态 离线
默认是explorer.exe不能删除的说
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
12 发表于 2008-09-14 11:19 ·  中国 浙江 宁波 电信
新手上路
积分 8
发帖 4
注册 2008-09-13 11:57
17年会员
UID 125543
性别 男
状态 离线
好不错
13 发表于 2008-09-14 11:19 ·  中国 浙江 宁波 电信
新手上路
积分 8
发帖 4
注册 2008-09-13 11:57
17年会员
UID 125543
性别 男
状态 离线
可以的,忘记说了
14 修改方案二: 发表于 2008-09-22 16:47 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
积分 2,025
发帖 1,122
注册 2007-09-05 20:15
18年会员
UID 96653
性别 男
状态 离线
修改.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=请输入:
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


恢复.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


下载地址:http://upload.cn-dos.net/img/781.rar
下载地址2: http://www.brsbox.com/filebox/down/fc/be99982f13243d6129bbffe4888e1e8a

[ Last edited by tireless on 2008-9-21 at 08:48 PM ]
本帖最近评分记录 (共 1 条) 点击查看详情
评分人分数时间
moniuming +8 2008-09-24 17:29
15 发表于 2008-09-24 17:30 ·  中国 广东 广州 广东金万邦科技投资有限公司(新一代数据中心)IDC机房(BGP)
银牌会员
★★★
永远的菜鸟
积分 1,335
发帖 574
注册 2007-11-27 12:50
18年会员
UID 103929
性别 男
来自 广西
状态 离线
好东西,顶起来!!!
论坛跳转: