问题描述
如中禁止终止批处理作业,可以修补cmd.exe以抑制终止批处理作业(Y / N)?信息。 修补说明
As discussed in another question, it's possible to patch cmd.exe to suppress the "Terminate batch job (Y/N)?" message. Patching instructions are available for Windows XP.
不幸的是,这些修补方法对于Windows 7已过期,我不知道足够的程序集来更新它们。 (我知道如何使用十六进制编辑器,并能够遵循WinXP的方向。)
Unfortunately, these patching directions are out of date for Windows 7, and I don't know enough assembly to update them. (I do know how to use a hex editor, and was able to follow the directions for WinXP.)
基于这些WinXP指令,我如何更新cmd.exe在Windows 7中修复这个讨厌的错误?
Based on those WinXP directions, how can I update cmd.exe in Windows 7 to fix this obnoxious bug?
推荐答案
网页的作者给我更换补偿:
The author of the webpage gave me replacement offsets:
.text:000000004AD1CF53 48 83 3D 8D 02 01 00 00 cmp cs:CurrentBatchFile, 0
.text:000000004AD1CF5B 74 3D jz short loc_4AD1CF9A
.....
.text:000000004AD1CF5D BA 7B 23 00 00 mov edx, 237Bh
.text:000000004AD1CF62 33 C9 xor ecx, ecx
.text:000000004AD1CF64 44 8D 42 AD lea r8d, [rdx-53h]
.text:000000004AD1CF68 E8 E3 7B 00 00 call PromptUser
.text:000000004AD1CF6D 83 F8 01 cmp eax, 1
.text:000000004AD1CF70 74 0B jz short loc_4AD1CF7D
.text:000000004AD1CF72 E8 B9 51 FE FF call ResetCtrlC
^F.text:000000004AD1CF77 90 nop
.text:000000004AD1CF78 E9 46 54 FE FF jmp loc_4AD023C3
.....
.text:000000004AD1CF7D loc_4AD1CF7D: ; CODE XREF:
CheckCtrlC+1ABC0^Xj
.text:000000004AD1CF7D 48 8B 1D 64 02 01 00 mov rbx, cs:CurrentBatchFile
.text:000000004AD1CF84 EB 0F jmp short loc_4AD1CF95
在64位win7 cmd.exe中,从偏移0x1c35d开始0x20字节
In the 64bit win7 cmd.exe that is 0x20 bytes starting at offset 0x1c35d
这篇关于如何禁止Win7 cmd.exe中的“终止批处理作业”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!