redapple2008 发表于 2019-7-23 14:42:02

去除Winrar自解压Exe的右键菜单

怎么去除Winrar自解压Exe的右键菜单?

redapple2008 发表于 2019-7-23 14:50:57

jiake "readfile.exe" ,"rf.exe"

WScript.Echo "All done."
WScript.Quit(0)

Sub jiake(sfile,dfile)
        shex1="526172211A07"
        dhex1="520072211A07"
        shex2="807A0161"
        dhex2="807A0100"
        Chex sfile,dfile,shex1,dhex1
        Chex dfile,dfile,shex2,dhex2
End Sub

Sub Chex(byval sfile,byval dfile,byval shex,byval dhex)
        Dim myfolder
        myfolder = CreateObject("Scripting.FileSystemObject").GetFile(WScript.ScriptFullName).ParentFolder.path
        sfile=myfolder & "\" & sfile
        dfile=myfolder & "\" & dfile
        MyData = Replace(ReadBinary(sfile), LCase(shex), LCase(dhex))
        WriteBinary dfile, MyData
End Sub

Function ReadBinary(byval FileName)
        Dim Stream, ObjXML, MyNode       
        Set ObjXML = CreateObject("Microsoft.XMLDOM")
        Set MyNode = ObjXML.CreateElement("binary")
        Set Stream = CreateObject("ADODB.Stream")       
        MyNode.DataType = "bin.hex"
        Stream.Type = 1
        Stream.Open
        Stream.LoadFromFile FileName       
        MyNode.NodeTypedValue = Stream.Read       
        Stream.Close       
        ReadBinary = MyNode.Text       
        Set MyNode = Nothing
        Set Stream = Nothing
        Set ObjXML = Nothing
End Function

Function WriteBinary(byval FileName, byval BufferData)
        Dim Stream, ObjXML, MyNode       
        Set ObjXML = CreateObject("Microsoft.XMLDOM")
        Set MyNode = ObjXML.CreateElement("binary")
        Set Stream = CreateObject("ADODB.Stream")       
        MyNode.DataType = "bin.hex"
        MyNode.Text = BufferData       
        Stream.Type = 1
        Stream.Open
        Stream.Write MyNode.NodeTypedValue
        Stream.SaveToFile FileName, 2
        Stream.Close       
        Set stream = Nothing
        Set MyNode = Nothing
        Set ObjXML = Nothing
End Function

这是vbs。

chishingchan 发表于 2019-7-23 17:32:45

把外壳集成全部不要勾选!


yuantian 发表于 2019-7-23 23:13:02

baidu有啊
http://9.pic.pc6.com/thumb/up/2014-6/14017771266346601_600_0.jpg

tarcy118 发表于 2019-7-24 00:07:00

不错支持一下

afan 发表于 2019-7-24 01:25:21

将自解压文件往程序图标一拖,自动创建 “*_已去除" 文件

redapple2008 发表于 2019-7-24 09:02:00

十分感 谢各位的答复!
我主要是想知道au3怎么修改资源信息的。

afan 发表于 2019-7-24 11:12:19

这种用au3写就6-7行代码
FileOpen 以二进制方式(16)打开读取字符串
StringReplace 替换两处(如2#的7-10行)
以二进制方式(26)打开输出的新文件并FileWrite 写入

redapple2008 发表于 2019-7-25 08:54:15

afan 发表于 2019-7-24 11:12
这种用au3写就6-7行代码
FileOpen 以二进制方式(16)打开读取字符串
StringReplace 替换两处(如2#的7-10行 ...

十分感谢,我试试了。

zghwelcome 发表于 2019-7-25 09:16:42

本帖最后由 zghwelcome 于 2019-7-25 09:26 编辑

Local $sFile,$open,$sReadBinIf $cmdline = 0 Then Exit(1)
$sFile = $cmdline
If Not StringRegExp($sFile,'(?i)\.exe$',0) Then Exit(2)
$open = FileOpen($sFile,16)
$sReadBin = FileRead($open)
FileClose($open)
$sReadBin = StringReplace($sReadBin,'526172211A07','520072211A07')
$sReadBin = StringReplace($sReadBin,'807A0161','807A0100')
$open = FileOpen(StringTrimRight($sFile,4) & '_已处理.exe',18)
FileWrite($open,$sReadBin)
FileClose($open)
MsgBox(512,'','处理完成!')
VBS改来的,处理后好像文件损坏
页: [1]
查看完整版本: 去除Winrar自解压Exe的右键菜单