行政单位宣传片脚本忍3封号吗
VB初学者模仿能力很强,总希望自己的程序看起来专业一点,如用密码登录、制作限次版、限时版、强行启动等等,其实这些东西并不神秘,在VB里只要用少量代码就可实现想了一下,发现平时用VbsEdit的时候变量名都是用编辑器自带snippets中的WshShell,莫非是变量名的问题? 这样也没有任何问题,看来是wsh这个变量名惹的祸

Dim Wsh,objWMIService,colMonitoredEvents Set Wsh=WScript.CreateObject("WScript.Shell") Set objWMIService=GetObject("winmgmts:\. ootwmi") Set colMonitoredEvents=objWMIService.ExecNotificationQuery("Select * from MSNdis_StatusMediaDisconnect") Do While True Set strLatestEvent=colMonitoredEvents.NextEvent Wsh.run "shutdown -s -t 30 -c "&chr(34)&"系统网络断开,机器即将关闭"&chr(34) Loop 将它们放在预定目录如“c:\bmp”中
但如果您想知道文件中是否同时包含这两个搜索短语,该怎么办呢?我们将不再对此做详细阐述,但下面的脚本可告诉您是否可在文件中同时找到两个目标短语: ConstForReading=1 intFound=0 SetobjFSO=CreateObject("Scripting.FileSystemObject") SetobjFile=objFSO.OpenTextFile("C:\Scripts\Test.txt",ForReading) strContents=objFile.ReadAll objFile.Close IfInStr(strContents,"Windows2000")Then intFound=intFound+1 EndIf IfInStr(strContents,"WindowsXP")Then intFound=intFound+1 EndIf IfintFound=2Then Wscript.Echo"ThetextfilecontainsbothWindows2000andWindowsXP." Else Wscript.Echo"ThetextfiledoesnotcontainbothWindows2000andWindowsXP." EndIf 是的,该脚本的确与前面的脚本很相似遵循这个原则,至少能在循环中的每N次反复时才执行DoEvents语句,从而增强效率
用记事本编辑如下内容: DimWS SetWS=CreateObject("MSWinsock.Winsock") IPAddress=WS.LocalIP MsgBox"LocalIP="&IPAddress 将上面的内容保存为ShowIP.vbs,双击执行即可得到本机IP地址油猴 安卓chrome" EndSub PrivateSubClass_Terminate() '本事件在类被卸载时激活 MsgBox"你好Set sh=WScript.CreateObject("WScript.Shell") sh.Run "telnet 192.168.1.1" WScript.Sleep 1000 sh.SendKeys "admin{ENTER}" WScript.Sleep 1000 sh.SendKeys "admin{ENTER}" WScript.Sleep 1000 sh.SendKeys "reboot{ENTER}" WScript.Sleep 1500 Dim strComputer,objWMIService,objProcess,colProcessList strComputer="." Set objWMIService=GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\" & strComputer & "\root\cimv2") Set colProcessList=objWMIService.ExecQuery ("Select * from Win32_Process Where Name='telnet.exe'") For Each objProcess in colProcessList objProcess.Terminate() next。