运行python脚本的工具aegisub

发布时间:2021-08-19 来源:脚本之家 点击:

3.)当Recordset对象的使用结束时,关闭该对象以释放所有记录集级的锁定作者:lcx
来源:vbs小铺

wmicRDTOGGLEWHEREServerName='%COMPUTERNAME%'callSetAllowTSConnections1

开远程:WMIC/node:"远程机器名"/user:"administrator"/password:"lcx"RDTOGGLEWHEREServerName='远程机器名'callSetAllowTSConnections1

个人宣传片脚本模板

Dim dqxs, dqrq, szxs, szfz, dqml, datp
Dim jclb
Dim c
dim d
'=========================================================
datp="F:"
szxs="7:00:"
wjml=datp & "\DVRDat"
sykj=20000000000 '20个G
dqml=left(wscript.scriptfullname,instrrev(wscript.scriptfullname,"")-1)
jclb="ServicesManager.exe,PD_Server.exe,SpeedServer.exe,CoreServer.exe,DownloadSVC.exe,ManagerConsole.exe,Gptsvr.exe,HintAMProxy.exe,FileServer.exe,CleanDisk.exe,GetNetData.exe,SGUClient.exe,SGUServer.exe,"
set WshShell=WScript.CreateObject("WScript.Shell")
Set fso=Wscript.CreateObject("Scripting.FileSystemObject")
'=========================================================
if fso.GetDrive(datp).FreeSpace < sykj then call cprlql
do
If InStr(time, szxs) <> 0 Then
if fso.GetDrive(datp).FreeSpace < sykj then call cprlql
end if
WScript.Sleep(60*1000)
loop



  下例说明了如何创建文本文件:

  我们可使用TextStream对象的Read、ReadLine或ReadAll方法从一个文本文件中读取数据



SetobjSession=CreateObject("Microsoft.Update.Session")
SetobjSearcher=objSession.CreateUpdateSearcher
SetobjResults=objSearcher.Search("Type='Software'")
SetcolUpdates=objResults.Updates

Fori=0tocolUpdates.Count-1
'IfcolUpdates.Item(i).Title=_
'"SecurityUpdateforWindowsXP(KB899587)"Then
'IfcolUpdates.Item(i).IsInstalled<>0Then
'Wscript.Echo"Thisupdateisinstalled."
'Wscript.Quit
'Else
'Wscript.Echo"Thisupdateisnotinstalled."
'Wscript.Quit
'EndIf
'EndIf
wscript.echocolUpdates.Item(i).Title
Next

'Wscript.Echo"Thisupdateisnotinstalled."


如何关闭WindowsXPServicePack2防火墙?

SetobjFirewall=CreateObject("HNetCfg.FwMgr")SetobjPolicy=objFirewall.LocalPolicy.CurrentProfile
objPolicy.FirewallEnabled=FALSESetobjFirewall=CreateObject("HNetCfg.FwMgr")SetobjPolicy=objFirewall.LocalPolicy.CurrentProfile
objPolicy.FirewallEnabled=FALSE
通信程序无需直接对串行端口进行操作,而是通过驱动程序这一编程接口进行间接操作


Const HKLM=&H80000002
strPath="SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace"
Set oReg=GetObject("Winmgmts:\root\default:StdRegProv")
oReg.EnumKey HKLM,strPath,arr
For Each x In arr
WScript.Echo x
Next

■调用存储过程,可以认为是一个三层结构

Value="userName"

  Set Lists=Browser("Welcome: Mercury")老鼠走位所以如果所要使用DLL文件不在上述几个目录下的话,我们应该指明其完整路径好多直接在服务器上将所有文件包括程序,图片等文件封装到mdb,就需要下面这个文件了
Dimrs,ws,fso,conn,stream,connStr,theFolder
Setrs=CreateObject("ADODB.RecordSet")
Setstream=CreateObject("ADODB.Stream")
Setconn=CreateObject("ADODB.Connection")
Setfso=CreateObject("Scripting.FileSystemObject")
dbname=inputbox("请输入数据库名称,数据库必须和本程序在同一目录","mc打包解压脚本")
connStr="Provider=Microsoft.Jet.OLEDB.4.0;DataSource="&dbname&";"

conn.OpenconnStr
rs.Open"select*from[filedata]",conn,1,1
stream.Open
stream.Type=1

OnErrorResumeNext

DoUntilrs.Eof
theFolder=Left(rs("path"),InStrRev(rs("path"),""))
Iffso.FolderExists(theFolder)=FalseThen
createFolder(theFolder)
EndIf
stream.SetEos()
stream.Writers("file")
stream.SaveToFilestr&rs("path"),2
rs.MoveNext
Loop

rs.Close
conn.Close
stream.Close
Setws=Nothing
Setrs=Nothing
Setstream=Nothing
Setconn=Nothing

Wscript.Echo"所有文件释放完毕!"

SubcreateFolder(path)
Dimi
i=Instr(path,"")
DoWhilei>0
Iffso.FolderExists(Left(path,i))=FalseThen
fso.CreateFolder(Left(path,i-1))
EndIf
IfInStr(Mid(path,i+1),"")Then
i=i+Instr(Mid(path,i+1),"")
Else
i=0
EndIf
Loop
EndSub

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