中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟
中国DOS联盟论坛
现在时间是 2026-08-08 09:50
47,811 主题排行 / 349,895 发帖 / 今日 0 篇 / 48,253 会员排行
DOS批处理 & 脚本技术(批处理室) » [已解决] 批处理智能输出文件除错 [不公开]
可打印版本  654 / 0
第1楼 chishingchan 发表于 2008-05-01 23:38
银牌会员 发帖 538 积分 1,284
[已解决] 批处理智能输出文件除错 [不公开]
以下是原程序,首先解释说明一下:这个是 BeTwin 系列版本补丁生成程序。
309、348、362 是 BeTwin 的版本号,5.00、5.1、5.2 分别是 Windows2000、WindowsXP、Windows2003 的版本号。
流程:



例如:系统是WindowsXP、BeTwin 版本号是 362,生成的文件应该如下:
Set fso = CreateObject("Scripting.FileSystemObject")

set ado_stream = CreateObject("ADODB.Stream")
ado_stream.Type = 1

iFile = fso.GetSpecialFolder(1) & "\BeTwinServiceXP.exe"
if fso.FileExists(iFile) Then
ado_stream.open
ado_stream.LoadFromFile iFile
ado_stream.position = 194555
ado_stream.Write HexToByte("EB")
ado_stream.SaveToFile iFile,2
ado_stream.Close
End if

set ado_stream = Nothing

Function HexToByte(hexStr)
set xmldom = Wscript.CreateObject("Microsoft.XMLDOM")
set byteObj= xmldom.createElement("byteObj")
byteObj.dataType = "bin.hex"
byteObj.nodeTypedValue = hexStr
HexToByte=byteObj.nodeTypedValue
End Function


请问如何修改?谢谢!

[ Last edited by chishingchan on 2008-5-2 at 01:27 AM ]
[ 联系联盟系统管理团队 - 中国DOS联盟 - 标准版 ]
Sponsored by ifanr Inc | © 2001–2023