1 Star 0 Fork 23

helloworld/aliddns6

forked from tyasky/aliddns6 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
createSchTask.vbs 702 Bytes
一键复制 编辑 原始数据 按行查看 历史
Dim Fso, Ws, ext, shpg, cwd, fp, cmdstr, rungap
' Author: tyasky
rungap = 5 ' 周期运行间隔分钟数
Set Fso = CreateObject("Scripting.FileSystemObject")
Set Ws = WScript.CreateObject("Wscript.Shell")
ext= Ws.RegRead("HKEY_CLASSES_ROOT\.sh\")
shpg = Split(Ws.RegRead("HKEY_CLASSES_ROOT\" & ext & "\shell\open\command\"), """")(1)
shpg = Fso.GetFile(shpg).ShortPath
cwd = Fso.GetParentFolderName(WScript.ScriptFullName)
fp = Fso.BuildPath(cwd, "aliddns.sh")
fp = Fso.GetFile(fp).ShortPath
cmdstr = shpg & " --hide " & fp
Ws.Run "cmd /c SCHTASKS /Create /TN aliddns /SC MINUTE /MO " & rungap & " /TR """ & cmdstr & """", 0
MsgBox "脚本运行完毕。",, "^_^"
WScript.Quit(0)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hao_tf/aliddns6.git
git@gitee.com:hao_tf/aliddns6.git
hao_tf
aliddns6
aliddns6
master

搜索帮助