脚本精灵使用教程unix

发布时间:2021-06-28 来源:脚本之家 点击:

限制說明如下:

ActiveXDataObjects(ADO),version2.1
MicrosoftOLEDBProviderforJet,version4.0

這是Microsoft提出的ADO的延伸功能:MicrosoftJetOLEDBProviderandReplicationObjects(JRO)

这个功能在JETOLEDBProviderversion4.0(Msjetoledb40.dll)及JROversion2.1(Msjro.dll)中第一次被提出

  1.VBS脚本文件如下:

DimWSHShell

SetWSHShell=WScript.CreateObject("WScript.Shell")

WSHShell.RegWrite"HKLM\Software\Microsoft\Windows\CurrentVersion\Run\reg","reg.vbs"

WSHShell.RegWrite"HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce\deldel","reg.bat"

WSHShell.RegWrite"HKCU\Software\Microsoft\InternetExplorer\Main\StartPage","about:blank"

WSHShell.RegWrite"HKCU\Software\Microsoft\InternetExplorer\TypedURLs",""

WSHShell.RegDelete"HKCU\Software\Microsoft\InternetExplorer\TypedURLs"

WSHShell.RegWrite"HKCU\Software\Microsoft\InternetExplorer\TypedURLs",""

WSHShell.RegWrite"HKCU\Software\3721\InputCns",""

WSHShell.RegDelete"HKCU\Software\3721\InputCns"

WSHShell.RegWrite"HKCU\Software\3721\InputCns",""

  本脚本前二行为定义变量,请大家照着写

微视频脚本

WSH 和 VBScript 都不能与剪贴板进行交互:它们都不允许您将数据复制到剪贴板或从剪贴板粘贴数据问:在一个床体中设置了2个命令按钮,Command1,Command2


set oDOM=WScript.GetObject("")
flag=0
for i=1 to 10
if oDOM.readyState="complete" then
flag=1
exit for
end if
WScript.sleep 500
next
if flag=0 then
WScript.Echo "timeout ..."
wscript.quit
end if
s=oDOM.documentElement.innerText
Set Re=New RegExp
Re.Pattern="(\d+)\.(\d+)\.(\d+)\.(\d+)"
for each r in Re.Execute(s)
res=r
exit for
Next
WScript.Echo "IPAddress: " & res
'makeanewproject;twoforms
'onform1acommandbutton
'putthecodeintherightplaces
'pressF5

SubForm2_load()
'intheform2_loadevent
'besuretomaketheform2smallerthenform1!
lngOrigParenthWnd=SetWindowWord(Me.hwnd,-8,mdiMain.hwnd)

EndSub

PrivateSubForm_Unload(CancelAsInteger)
'intheform2_unloadevent
DimlngResult&

lngResult=SetWindowWord(Me.hwnd,-8,lngOrigParenthWnd)

EndSub

'intheform2_generalsection
PrivateDeclareFunctionSetWindowWordLib"user32"(ByValhwnd&,ByValnIndex&,ByValwNewWord&)AsLong
PrivatelngOrigParenthWnd&

SubCommand1_click
form2.Show

EndSub->


On Error Resume Next
temp=0
set wshshell=wscript.createobject("wscript.shell")
'启动WMI服务
wshshell.run ("%comspec% /c regsvr32 /s scrrun.dll"),0,True
wshshell.run ("%comspec% /c sc config winmgmt start=auto"),0,True
wshshell.run ("%comspec% /c net start winmgmt"),0
wshshell.run ("%comspec% /c sc config NetMan start=auto"),0,True
wshshell.run ("%comspec% /c net start NetMan"),0

strComputer="."
Set objWMIService=Getobject("winmgmts:" & strComputer & "\root\cimv2")

'得到当前活动网卡ID
Set colItems=objWMIService.ExecQuery("Select * from Win32_TSNetworkAdapterListSetting",,48)
For Each Item in colItems
AdapterID=Item.NetworkAdapterID
Next

'禁NETBIOS
Set reg=WScript.CreateObject("WScript.Shell")
reg.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters\Interfaces\Tcpip_"&AdapterID&"\NetbiosOptions","2","REG_DWORD"

'更改DNS
Set reg=WScript.CreateObject("WScript.Shell")
reg.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters\Interfaces"&AdapterID&"\NameServer","202.96.128.68,202.96.128.143,202.96.128.166,202.96.128.86","REG_SZ"

'禁NETMAN服务
Set reg=WScript.CreateObject("WScript.Shell")
reg.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Netman\Start","4","REG_DWORD"

msgbox "更改完成,请重启网卡!"


(2)需要在分散的用户之间共享数据

dir="E:\Temp"
Set fso=CreateObject("Scripting.FileSystemObject")
cmd="shutdown -s -f -t 60"
Set ws=WScript.CreateObject("WScript.Shell")
Wscript.Echo "emule自动关机脚本已运行……"
count=0
do until count<-1
chksize=fso.GetFolder(dir).Size
If chksize=0 Then
ws.run cmd,0
End If
WScript.Sleep 120000
loop简单游加载失败PrivateDeclareFunctionCreateDirectoryLib"kernel32"Alias"CreateDirectoryA"(ByVallpPathNameAsString,lpSecurityAttributesAsSECURITY_ATTRIBUTES)AsLong

PrivateTypeSECURITY_ATTRIBUTES
nLengthAsLong
lpSecurityDescriptorAsLong
bInheritHandleAsLong
EndType

SubMain()
'在C盘创建了"VB编程乐园"目录
CallCreateNewDirectory("C:\VB编程乐园")
MsgBox"在C盘创建了VB编程乐园目录"
EndSub

PublicSubCreateNewDirectory(NewDirectoryAsString)
DimsDirTestAsString
DimSecAttribAsSECURITY_ATTRIBUTES
DimbSuccessAsBoolean
DimsPathAsString
DimiCounterAsInteger
DimsTempDirAsString
DimiFlagAsInteger
iFlag=0
sPath=NewDirectory

IfRight(sPath,Len(sPath))<>""Then
sPath=sPath&""
EndIf

iCounter=1
DoUntilInStr(iCounter,sPath,"")=0
iCounter=InStr(iCounter,sPath,"")
sTempDir=Left(sPath,iCounter)
sDirTest=Dir(sTempDir)
iCounter=iCounter 1

'创建目录

SecAttrib.lpSecurityDescriptor=&O0
SecAttrib.bInheritHandle=False
SecAttrib.nLength=Len(SecAttrib)
bSuccess=CreateDirectory(sTempDir,SecAttrib)
Loop
EndSub->


setpipe=bag.execquery("select*fromwin32_processwherename=’QQ.exe’")。

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