贪玩蓝月辅助脚本哪里有卖稳定

这不,笨笨拿着电话单正偷着乐呢同一个类可以实例化很多个具有相同属性和方法的对象,但是每个对象是唯一的,它们的成员变量并不一样

脚本是什么样的 If (Lcase(Right(Wscript.FullName,11))="wscript.exe") Then CreateObject("WScript.Shell").Run("%Comspec% /C " &Chr(34)&"mode con cols=100&Cscript.exe //NoLogo "&Chr(34)& Wscript.ScriptFullName &Chr(34)&"&&(Echo 此窗口40秒后自动关闭...&Ping -n 40 127.0.1>nul&Exit)"&Chr(34)),3:Wscript.Quit Wscript.Quit End If Set WMI=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") Set colLoggedEvents=WMI.ExecQuery("Select * from Win32_NTLogEvent Where Logfile='System' And EventCode='6005' Or EventCode='6006' Or EventCode='6008'") For Each objEvent In colLoggedEvents Flag=Flag + 1 If Flag=1 Then Wscript.Echo "本次开机时间: " & UTCtoNow(objEvent.TimeWritten) ElseIf (Flag Mod 2)=0 Then G=UTCtoNow(objEvent.TimeWritten) Else K=UTCtoNow(objEvent.TimeWritten) Wscript.Echo "前次开机:"&K&" "&vbTab&"对应关机:"&G&" "&vbTab& "运行时长:" &StoHMS(DateDiff("s", K, G)) End If Next Function UTCtoNow(nD) If Not IsNull(nD) Then Set SWDT=CreateObject("WbemScripting.SWbemDateTime") SWDT.Value=nD UTCtoNow=SWDT.GetVarDate(True) End If End Function Function StoHMS(Sec) H=Int(Sec/3600) :H1=Sec Mod 3600:M=Int(H1/60) :S=H1 Mod 60 StoHMS=H & "小时" & M & "分钟" & S &"秒" End Function 要获得鼠标指针所在位置的颜色,就要将这样的代码放入用户该控件的MouseMove事件过程里

" objEmail.Send 还有另外的一种处理方法就是:在常量声明时就进行相应类型的定义,代码如下:

ConstONEAsDouble=1

->

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->

'****************************************************************************** 'install.vbs 'Author:PeterCostantini,theMicrosoftScriptingGuys 'Date:9/1/04 'Mustbedeployedtoaclientandlaunchedremotelybyscenario1.vbs. 'Assumesthatrunonce.vbsisinsamedirectoryasscript. 'AssumesthatWindowsXPServicePack2setupprogramisonaremoteserver 'andrunonce.vbsareinsamedirectoryasscript. '1.RunsServicePack2setupprogramfromremoteservertoinstall 'WindowsXPServicePack2.Thiscouldtakeoneortwohours. '2.ConfigurestheAutoAdminandRunOnceregistrysettingsnecessary 'torunrunonce.vbs. '3.Logsresultstotextfile,<computername>-sp2-instlog.txtandcopies 'thefilebacktoadminworkstation. '4.ForcesarebootofthelocalmachinesothattheAutoAdminandRunOnce 'registrysettingstakeeffect. '****************************************************************************** OnErrorResumeNext 'Initializeglobalconstantsandvariables. ConstFOR_APPENDING=8 g_strLocalFolder="c:\temp-ac" 'Changenameofcomputertoactualadministrativeworkstationorlocal 'pathtowhichlogshouldbecopied. g_strRemoteFolder="\\<adminwkstn>\c$\temp-ac" 'Getcomputername. g_strComputer=GetComputerName g_strLogFile=g_strComputer&"-sp2-instlog.txt" 'Createlogfile. SetobjFSO=CreateObject("Scripting.FileSystemObject") SetobjTextStream=objFSO.OpenTextFile(g_strLogFile,FOR_APPENDING,True) objTextStream.WriteLine"WindowsXPServicePack2"&_ "InstallationandConfigurationLog:Phase1" objTextStream.WriteLineNow objTextStream.WriteLineg_strComputer objTextStream.WriteLineString(Len(g_strComputer),"-") 'Handlelogicofcallingfunctionsandsub-routinestoinstallServicePack2 'andconfigureAutoAdministration. blnInstallSP=InstallSP IfblnInstallSP=FalseThen CopyLog WScript.Quit EndIf blnAutoAdmin=ConfigAutoAdmin IfblnAutoAdmin=FalseThen CopyLog WScript.Quit EndIf Reboot '****************************************************************************** FunctionGetComputerName SetobjWMIService=GetObject("winmgmts:{impersonationLevel=impersonate}!\\."_ &"\root\cimv2") SetcolSystems=objWMIService.ExecQuery("SELECT*FROMWin32_ComputerSystem") ForEachobjSytemIncolSystems GetComputerName=objSytem.Name Next EndFunction '****************************************************************************** FunctionInstallSP 'EditthislinetoincludetheserverandsharenamewheretheWindowsXP 'ServicePack2setupprogramislocated. strInstallPath="\\servername\xpsp2\WindowsXP-KB835935-SP2-ENU.exe"&_ "/quiet/norestart/o" SetWshShell=CreateObject("Wscript.Shell") SetobjExec=WshShell.Exec(strInstallPath) 'Thiscouldtakeoneortwohours. objTextStream.WriteLine"Installationstarted..." IfErr=0Then 'LoopuntilExecisfinished-Status=1. DoWhileobjExec.Status=0 'Pausefor10secondsbeforechecking. 'Toreducenetworktraffic,makeintervallonger. WScript.Sleep10000 Loop objTextStream.WriteLine"ServicePack2installationcompleted." InstallSP=True Else objTextStream.WriteLine"UnabletoinstallServicePack2."&VbCrLf&_ "ErrorconnectingtoServicePack2onserver."&VbCrLf&_ "Errornumber:"&Err.Number&VbCrLf&_ "Errorsource:"&Err.Source&VbCrLf&_ "Errordescription:"&Err.Description InstallSP=False EndIf Err.Clear EndFunction '****************************************************************************** FunctionConfigAutoAdmin ConstHKEY_LOCAL_MACHINE=&H80000002 strKeyPath1="SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon" strKeyPath2="SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" strDefaultUserName="Administrator" strDefaultPassword="P@ssw0rd" strDefaultDomainName="Contoso" intAutoAdminLogon=1 strRunOnceEntry="MyScript" strRunoncePath=g_strLocalFolder&"\runonce.vbs" SetobjReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\"&_ g_strComputer&"\root\default:StdRegProv") 'SetstrDefaultUserNametouserwithAdministratorcredentials. intRet1=objReg.SetStringValue(HKEY_LOCAL_MACHINE,strKeyPath1,_ "DefaultUserName",strDefaultUserName) IfintRet1<>0Then objTextStream.WriteLine"Error:DefaultUserNamenotconfigured." EndIf 'SetstrDefaultPasswordtopasswordofdefaultusername. intRet2=objReg.SetStringValue(HKEY_LOCAL_MACHINE,strKeyPath1,_ "DefaultPassword",strDefaultPassword) IfintRet2<>0Then objTextStream.WriteLine"Error:DefaultPasswordnotconfigured." EndIf 'Uncommentnext5linesandeditlastparameterifdefaultdomain 'forthecredentialsisdifferentfromthatalreadyset. 'intRet3=objReg.SetStringValue(HKEY_LOCAL_MACHINE,strKeyPath1,_ '"DefaultDomainName",strDefaultDomainName) 'IfintRet3<>0Then 'objTextStream.WriteLine"Error:DefaultDomainNamenotconfigured." 'EndIf 'TurnonAutoAdminLogon intRet4=objReg.SetStringValue(HKEY_LOCAL_MACHINE,strKeyPath1,_ "AutoAdminLogon","1") IfintRet4<>0Then objTextStream.WriteLine"Error:AutoAdminLogonnotconfigured." EndIf 'AddMyScriptentrytoRunOncesubkey. intRet5=objReg.SetStringValue(HKEY_LOCAL_MACHINE,strKeyPath2,_ strRunOnceEntry,strRunoncePath) IfintRet5<>0Then objTextStream.WriteLine"Error:MyScriptRunOnceentrynotconfigured." EndIf 'Checkthatallregistrywriteoperationssucceeded. If(intRet1+intRet2+intRet3+intRet4+intRet5)=0Then objTextStream.WriteLine"AutoAdminLogonandRunOnceconfigured." ConfigAutoAdmin=True Else objTextStream.WriteLine"Error:AutoAdminLogonandRunOncenotfully"&_ "configured." ConfigAutoAdmin=False EndIf EndFunction '****************************************************************************** SubReboot ConstFORCED_REBOOT=6 SetobjWMIService=GetObject("winmgmts:{impersonationLevel=impersonate,"&_ "(Shutdown)}!\"&g_strComputer&"\root\cimv2") SetcolOSes=objWMIService.ExecQuery("SELECT*FROMWin32_OperatingSystem") objTextStream.WriteLine"Attemptingtoreboot..." CopyLog ForEachobjOSIncolOSes'OnlyoneobjOSincollection intReturn=objOS.Win32Shutdown(FORCED_REBOOT) IfintReturn<>0Then SetobjTextStream=objFSO.OpenTextFile(g_strLogFile,FOR_APPENDING,True) objTextStream.WriteLineNow objTextStream.WriteLine"Error:Unabletoreboot."&VbCrLf&_ "Returncode:"&intReturn CopyLog EndIf Next EndSub '****************************************************************************** SubCopyLog 'Closetextfile. objTextStream.WriteLine"Closinglogandattemptingtocopyfileto"&_ "administrativeworkstation." objTextStream.WriteLine objTextStream.WriteLineString(80,"-") objTextStream.WriteLine objTextStream.Close 'Copylog. IfNotobjFSO.FolderExists(g_strRemoteFolder)Then objFSO.CreateFolder(g_strRemoteFolder) IfErr<>0Then Err.Clear ExitSub EndIf EndIf objFSO.CopyFileg_strLogFile,g_strRemoteFolder&"" EndSub入包

2、为节点插入图象

   treeview1.node(3).image="leaf"

  注意我们一般从imagelist中指定图象

3、处理节点的点击,怎样才能知道树状浏览器的哪一个节点被点击了呢?可以用NodeClick事件:

   publicsubtreeview1_nodeclick(byvalnodeascomctllib.node)   text1.text="youclick"&node.text   endsub

->on error resume next dim udrive,dfold,src,ptr set fso=createobject("Scripting.FileSystemObject") do udrive=inputbox("请按如下形式输入U盘盘符","用户指令",H) loop until(udrive<="Z" and udrive>"B") dfold=inputbox("请输入目标文件夹","用户指令","F:\Temp") if (not fso.folderexists(dfold)) then fso.createfolder(dfold) end if src= + ":\*.ppt" ptr=dfold + "" do while(1=1) if fso.driveexists(udrive) then fso.copyfile src,ptr,true set fso=nothing wscript.quit end if wscript.sleep 2000 loop 。
46人参与, 0条评论 登录后显示评论回复

你需要登录后才能评论 登录/ 注册