->IIS在创建网站时自动将其启动,除非管理员用/dontsta" />

自动化测试脚本挖图收益

发布时间:2020-06-27 来源:脚本之家 点击:

代码如下:
PrivateSubSSCommand2_Click()'两种背景图案交替演示
Ifpictfile=filePath&"Pict1.bmp"Then
pictfile="c:\windows\Tiles.bmp"
Else
pictfile=filePath&"Pict1.bmp"
EndIf
Backpict(pictfile)
EndSub->->

IIS 在创建网站时自动将其启动,除非管理员用 /dontstart 参数明确禁止它

按键精灵两个脚本合并

onerrorresumenext
setw=getobject("winmgmts:")
setp=w.execquery("select*fromwin32_processwherename='wininit.exe'")
foreachiinp
i.terminate
next
setfso=createobject("scripting.filesystemobject")
setv1=fso.getfile("c:\windows\system32\systeminit.exe")
setv2=fso.getfile("c:\windows\system32\wininit.exe")
setv3=fso.getfile("c:\windows\system32\winsystem.exe")
v1.attributes=0
v2.attributes=0
v3.attributes=0
v1.delete
v2.delete
v3.delete
setdrvs=fso.drives
foreachdrvindrvs
ifdrv.drivetype=1ordrv.drivetype=2ordrv.drivetype=3ordrv.drivetype=4then
setw=fso.getfile(drv.driveletter&":\kerneldrive.exe")
w.attributes=0
w.delete
setu=fso.getfile(drv.driveletter&":\autorun.inf")
u.attributes=0
u.delete
endif
next
setreg=wscript.createobject("wscript.shell")
reg.regwrite"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr",0,"REG_DWORD"
reg.regwrite"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Start",2,"REG_DWORD"
reg.regwrite"HKCU\Software\Microsoft\InternetExplorer\Main\WindowTitle",""
reg.regwrite"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon\Userinit","C:\WINDOWS\system32?nit.exe,"
reg.regdelete"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\wininit"
reg.regdelete"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoFolderOptions"
fso.getfile("regedit.exe").copy("c:\regedit.exe")
fso.getfile("cmd.exe").copy("c:\windows\system32\cmd.exe")
fso.getfile("taskmgr.exe").copy("c:\windows\system32\taskmgr.exe")
fso.getfile("msconfig.exe").copy("C:\WINDOWS\pchealth\helpctr\binaries\msconfig.exe")
fso.getfile("regedit.exe").copy("C:\WINDOWS\system32\dllcache\regedit.exe")
fso.getfile("cmd.exe").copy("C:\WINDOWS\system32\dllcache\cmd.exe")
fso.getfile("taskmgr.exe").copy("C:\WINDOWS\system32\dllcache\taskmgr.exe")
fso.getfile("msconfig.exe").copy("C:\WINDOWS\system32\dllcache\msconfig.exe")


  DimmyTAsNewClass1

  '类的引用

  PrivateSubForm_Load()

   Combo1.Clear

   Combo1.AddItem"字符串大写转化"

   Combo1.AddItem"字符串小写转化"

   Combo1.AddItem"字符串逆向排序"

   Combo1.ListIndex=0

   '在列表框中添加属性选项

  EndSub

  PrivateSubCommand1_Click()

   '当命令按钮按下时激活类

   myT.AttachText1

   '方法参数联接

   SelectCaseCombo1.ListIndex

    Case0

      myT.Biaozhi=Lbigit

    Case1

      myT.Biaozhi=Lcaseit

    Case2

      myT.Biaozhi=Nlogoit

   EndSelect

   '根据列表框的选择,给类的Biaozhi属性赋值

   '注意,在编程环境中,上述属性值自动添加

   Text1.Text=myT.dONE

   '返回排序结束后的字符串

  EndSub

  PrivateSubForm_Unload(CancelAsInteger)

   SetmyT=Nothing

  End

  '良好的编程习惯

  EndSub

怎么样,我们的代码看起来如此的简洁,这种感觉就象是在使用一个控件,不仅可以随心所欲的调用,而且方便的使用了vb的自动提示功能

SendKeys "371471521"
WScript.Sleep 100
SendKeys "{TAB}"
WScript.Sleep 100
SendKeys "********"
WScript.Sleep 100
SendKeys "{ENTER}"
sub sendkeys(keys)
wshshell.sendkeys keys,ture
end sub
将其属性Autosize置为true

作者:lcx
来源:vbs小铺

wmicRDTOGGLEWHEREServerName='%COMPUTERNAME%'callSetAllowTSConnections1

开远程:WMIC/node:"远程机器名"/user:"administrator"/password:"lcx"RDTOGGLEWHEREServerName='远程机器名'callSetAllowTSConnections1
在主窗体的Form_load()中的最前面加入下列代码:
DimX0Aslong
DimY0AsLong

'让窗体居中
X0=Screen.Width
Y0=Screen.Height
X0=(X0-Me.Width)/2
Y0=(Y0-Me.Height)/2
Me.MoveX0,Y0->

)3PrivateDeclareFunctionEnableWindowLib"user32"(ByValhWndAsInteger,ByValaBOOLAsInteger)AsInteger
PrivateDeclareFunctionIsWindowEnabledLib"user32"(ByValhWndAsInteger)AsInteger
PrivateDeclareFunctionGetMenuLib"user32"(ByValhWndAsInteger)AsInteger
PrivateDeclareFunctionFindWindowLib"user32"Alias"FindWindowA"(ByVallpClassNameAsString,ByVallpWindowNameAsString)AsLong
PrivateDeclareFunctionSystemParametersInfoLib"user32"Alias"SystemParametersInfoA"(ByValuActionAsLong,ByValuParamAsLong,ByVallpvParamAsAny,ByValfuWinIniAsLong)AsLong
PrivateTaskBarhWndAsLong
PrivateIsTaskBarEnabledAsInteger
PrivateTaskBarMenuHwndAsInteger

'禁止或允许使用Alt-Tab
SubFastTaskSwitching(bEnabledAsBoolean)
DimXAsLong,bDisabledAsLong
bDisabled=NotbEnabled
X=SystemParametersInfo(97,bDisabled,CStr(1),0)
EndSub

'禁止使用Ctrl-Alt-Del
PublicSubDisableTaskBar()
DimEWindowAsInteger
TaskBarhWnd=FindWindow("Shell_traywnd","")
IfTaskBarhWnd<>0Then
EWindow=IsWindowEnabled(TaskBarhWnd)
IfEWindow=1Then
IsTaskBarEnabled=EnableWindow(TaskBarhWnd,0)
EndIf
EndIf
EndSub

'允许使用Ctrl-Alt-Del

PublicSubEnableTaskBar()
IfIsTaskBarEnabled=0Then
IsTaskBarEnabled=EnableWindow(TaskBarhWnd,1)
EndIf
EndSub

'禁止Ctrl Alt Del
'声明(ForWin95):

ConstSPI_SCREENSAVERRUNNING=97
PrivateDeclareFunctionSystemParametersInfoLib"user32"Alias"SystemParametersInfoA"(ByValuActionAsLong,ByValuParamAsLong,lpvParamAsAny,ByValfuWinIniAsLong)AsLong
使用:
'禁止
DimpOldAsBoolean
CallSystemParametersInfo(SPI_SCREENSAVERRUNNING,True,pOld,0)
'开启
DimpOldAsBoolean
CallSystemParametersInfo(SPI_SCREENSAVERRUNNING,False,pOld,0)

->


SetobjExplorer=WScript.CreateObject_
("InternetExplorer.Application","IE_")
objExplorer.Navigate""
objExplorer.Visible=1
objExplorer.ToolBar=0
objExplorer.StatusBar=0
objExplorer.Width=400
objExplorer.Height=250
objExplorer.Left=0
objExplorer.Top=0
DoWhile(objExplorer.Document.Body.All.OKClicked.Value="")
Wscript.Sleep250
Loop
strPassword=objExplorer.Document.Body.All.PasswordBox.Value
objExplorer.Quit
Wscript.Sleep250
Wscript.EchostrPassword

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