Linly-Talker支持语音相位一致性保持
2025/12/21 3:52:40
在 Windows 环境中,可使用 Windows Management Instrumentation (WMI) 查询来创建新的计划任务。以下是实现该功能的脚本代码:
Dim sCmd, oWMI, oJob, errResult, iJob If WScript.Arguments.Named.Exists("force") Then sCmd = "defrag.exe " & WScript.Arguments.Named("volume") & ": -f" Else sCmd = "defrag.exe " & WScript.Arguments.Named("volume") & ":" End If On Error Resume Next Verbose "Connecting to " & sName Set oWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & sName & "\root\cimv2") If Err <> 0 Then WScript.Echo " ** Couldn’t connect to WMI on " & sName LogBadConnect(sName) Else Verbose " Scheduling job on " & sName Set oJob = o