脚本专栏 
首页 > 脚本专栏 > 浏览文章

去掉RAR右键解压菜单的VBS代码

(编辑:jimmy 日期: 2024/5/16 浏览:3 次 )
原理: http://demon.tw/programming/vbs-binary-file-another.html

复制代码 代码如下:
Public ReadBinary
ReadBinaryDat(".\1.exe")
BinaryDat = Replace(Replace(ReadBinary, "526172211a07", "522172211a07"), "807a0161", "807a0121")
WriteBinaryDat "new.exe", BinaryDat
Function ReadBinaryDat(FileName)
 Const adTypeBinary = 1
 Dim stream, xmldom, node
 Set xmldom = CreateObject("Microsoft.XMLDOM")
 Set node = xmldom.CreateElement("binary")
 node.DataType = "bin.hex"
 Set stream = CreateObject("ADODB.Stream")
 stream.Type = adTypeBinary
 stream.Open
 stream.LoadFromFile FileName
 node.NodeTypedValue = stream.Read
 stream.Close
 Set stream = Nothing
 ReadBinary = node.Text
 Set node = Nothing
 Set xmldom = Nothing
End Function

Sub WriteBinaryDat(FileName, Buf)
 Const adTypeBinary = 1
 Const adSaveCreateOverWrite = 2
 Dim stream, xmldom, node
 Set xmldom = CreateObject("Microsoft.XMLDOM")
 Set node = xmldom.CreateElement("binary")
 node.DataType = "bin.hex"
 node.Text = Buf
 Set stream = CreateObject("ADODB.Stream")
 stream.Type = adTypeBinary
 stream.Open
 stream.write node.NodeTypedValue
 stream.saveToFile FileName, adSaveCreateOverWrite
 stream.Close
 Set stream = Nothing
 Set node = Nothing
 Set xmldom = Nothing
End Sub

上一篇:vbs 多线程下载实现代码
下一篇:VBS数组函数学习实例分析
一句话新闻
高通与谷歌联手!首款骁龙PC优化Chrome浏览器发布
高通和谷歌日前宣布,推出首次面向搭载骁龙的Windows PC的优化版Chrome浏览器。
在对骁龙X Elite参考设计的初步测试中,全新的Chrome浏览器在Speedometer 2.1基准测试中实现了显著的性能提升。
预计在2024年年中之前,搭载骁龙X Elite计算平台的PC将面世。该浏览器的提前问世,有助于骁龙PC问世就获得满血表现。
谷歌高级副总裁Hiroshi Lockheimer表示,此次与高通的合作将有助于确保Chrome用户在当前ARM兼容的PC上获得最佳的浏览体验。
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网