首页脚本去掉RAR右键解压菜单的VBS代码

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

时间2024-02-11 15:06:03发布访客分类脚本浏览881
导读:收集整理的这篇文章主要介绍了去掉RAR右键解压菜单的VBS代码,觉得挺不错的,现在分享给大家,也给大家做个参考。 原理: http://demon.tw/programming/vbs-...
收集整理的这篇文章主要介绍了去掉RAR右键解压菜单的VBS代码,觉得挺不错的,现在分享给大家,也给大家做个参考。 原理: 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

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!


若转载请注明出处: 去掉RAR右键解压菜单的VBS代码
本文地址: https://pptw.com/jishu/609957.html
VBScript压缩单个文件为zip格式 将信息保存到一个XML文件的vbs代码

游客 回复需填写必要信息