通过vbs获取远程host文件并保存到指定目录
Sub download(url,target)
Const adTypeBinary = 1
Const adTypeText = 2
Const adSaveCreateOverWrite = 2
Dim http,ado
Set http = CreateObject("Msxml2.ServerXMLHTTP")
http.SetOption 2,13056
http.open "GET",url,False
http.send
Set ado = createobject("Adodb.Stream")
ado.Type = adTypeBinary
ado.Open
ado.Write http.responseBody
ado.SaveToFile target,adSaveCreateOverWrite
ado.Close
End Sub
Set WshShell=CreateObject("WScript.Shell")
WinDir =WshShell.ExpandEnvironmentStrings("%WinDir%")
HostsFile = WinDir & "System32DriversetcHosts_google"
Const hosts="https://raw.githubusercontent.com/vokins/simpleu/master/hosts"
download hosts,HostsFile
经测试,由于网络问题,可能获取会超时,建议大家多运行几次。或加入脚本可执行时间。
vbs实现unicode和ascii编码转换
一、CopyaUnicodeFiletoanANSIFileWiToAnsi.vbs文件:'UtilitytorewriteaUnicodetextfileasanANSItextfile'ForusewithWindowsScriptingHost,CScript.exeorWScript.exe'Copyright(c)1999,MicrosoftCorporation'O
自定义vbs脚本实现开机后延时启动指定程序的方法
概述系统开机时,顺带自动启动了不少驱动程序,使得电脑开机后鼠标要呆滞许久。为了加快windows的开机速度,在参考网上不少大牛的资料后,整理出
ass2srt.vbs(ass/ssa批量转换srt的脚本)
iPad中的OPlayer只支持srt格式的字幕,而动画一般使用的是ass/ssa格式的字幕,所以需要将ass/ssa批量转换srt。Google了一下,在《ass2srt[ass/ssa批量转换srt]》中
想了解相关产品?
扫码添加企业微信,预约演示。
