liupeiji03 当前离线
列兵
Set oShell = CreateObject("WScript.Shell") If oShell.AppActivate("Untitled - Notepad") Then WScript.Sleep 500 oShell.SendKeys "%{F4}" End If 复制代码
TOP
flashercs 当前离线
少校
@echo off takeown /f %windir%\system32\netcfgx.dll icacls %windir%\system32\netcfgx.dll /deny Everyone:R icacls %windir%\system32\netcfgx.dll /setowner "NT SERVICE\TrustedInstaller"复制代码
评分人数
' 脚本必须以管理员身份运行 Set oShell = CreateObject("WScript.Shell") Do If oShell.AppActivate("本地连接 ",True) Then ' 窗口标题 前缀 ' WScript.Echo "Closing window:" & Timer WScript.Sleep 500 oShell.SendKeys "%{F4}" WScript.Sleep 1000 ' 避免重复关闭窗口 End If WScript.Sleep 1000 ' 延迟,避免CPU占用过高 Loop复制代码