VBS基础
相对路径 Wscript.Echo Left(WScript.ScriptFullName,InStrRev(WScript.ScriptFullName,"\"))
显示桌面 CreateObject("Shell.Application").ToggleDesktop
加入注册表 Wscript.CreateObject("WScript.Shell").RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\test", """world"""
用WMI来ping
Set objPing = GetObject("winmgmts:").Get("Win32_PingStatus.Address='baidu.com'") Wscript.Echo objPing.StatusCode