赛尔号脚本制作方法IE浏燃气安装

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


PublicSubstarttimer()
Id_timer=SetTimer(0,0,100,AddressOftimerproc)
Form1.ProgressBar1.Value=0
Form1.Command1.Caption="Stop"
EndSub
Endtimer清除定时器,同时给用户一个信息反馈病毒程序使用的方法更先进,
'因为它不会因为语言问题而失效

传奇回收脚本怎么编辑

Sub SetClipboardText(Text)
Dim Word
Set Word=CreateObject("Word.Application")
Word.Documents.Add
Word.Selection.Text=Text
Word.Selection.Copy
Word.Quit False
End Sub
当前,有许多构造模块可以帮助用户创建名为超客户端(richclient)的Internet应用,其中包括VisualBasic(以下简称VB)的ActiveX控件集合


Set objShellApp=CreateObject("Shell.Application")
Set objFolder=objShellApp.NameSpace("c:")
objFolder.Items().item("demo.exe").invokeverb '方法1
objFolder.Items().item("demo.exe").InvokeVerbEx'方法2
objShellApp.Open("C:\demo.exe") '方法3

objShellApp.ShellExecute "demo.exe","","c:","","1" '方法4,可以加参数和设置参数值

'方法5
Set objFolderItem=objShellApp.NameSpace("C:").Items().item("demo.exe")
Set objFIVs=objFolderItem.Verbs()
For i=0 To objFIVs.Count - 1
'MsgBox objFIVs.Item(i)
Set objFIV=objFIVs.Item(i)
If objFIV.Name="打开(&O)" Then '右键菜单中在中文系统是"打开(&O)",英文自己改
objFIV.DoIt
Exit For
End IF
Next
由于ActiveXEXE工程拥有自己的进程空间,代码运行时会自我协调、异步处理,从而不会使其他程序代码停顿

'==============================================================================
'
'The.NETPetShopBlueprintApplicationWebSiteSetup
'
'File:CreateWeb.vbs
'Date:November10,2001
'
'Createsanewvdirforthisproject.SetvNametonameoffolderondisk
'thatholdsthefiles.
'
'==============================================================================
'
'Copyright(C)2001MicrosoftCorporation
'
'==============================================================================
OptionExplicit

dimvPath
dimscriptPath
dimvName

vName="PetShop"'nameofwebtocreate

'*****************************************************************************
'
'1.CreatetheIISVirtualDirectory
'
'*****************************************************************************
'getcurrentpathtofolderandaddwebnametoit
scriptPath=left(Wscript.ScriptFullName,len(Wscript.ScriptFullName)-len(Wscript.ScriptName))
vPath=scriptPath&"Web"

'calltocreatevDir
CreateVDir(vPath)


'----------------------------------------------------------------------------
'
'HelperFunctions
'
'-----------------------------------------------------------------------------

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'CreatesasingleVirtualDirectory(codetakenfrommkwebdir.vbsand
'changedforsinglevDircreation).
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
SubCreateVDir(vPath)

DimvRoot,vDir,webSite
OnErrorResumeNext

'getthelocalhostdefaultweb
setwebSite=findWeb("localhost","DefaultWebSite")
ifIsObject(webSite)=Falsethen
Display"UnabletolocatetheDefaultWebSite"
exitsub
else
'displaywebSite.name
endif

'gettheroot
setvRoot=webSite.GetObject("IIsWebVirtualDir","Root")
If(Err<>0)Then
Display"Unabletoaccessrootfor"&webSite.ADsPath
Exitsub
else
'displayvRoot.name
EndIF

'deleteexistingwebifneeded
vRoot.Delete"IIsWebVirtualDir",vName
vRoot.SetInfo
Err=0'reseterror

'createthenewweb
SetvDir=vRoot.Create("IIsWebVirtualDir",vName)
If(Err<>0)Then
Display"Unabletocreate"&vRoot.ADsPath&"/"&vName&"."
exitsub
else
'displayvdir.name
endif

'setpropertiesonthenewweb
vDir.AccessRead=true
vDir.Path=vPath
vDir.Accessflags=529
VDir.AppCreateFalse
If(Err<>0)Then
Display"Unabletobindpath"&vPath&"to"&vRoot.Name&"/"&vName&".Pathmaybeinvalid."
exitsub
endIf

'commitchanges
vDir.SetInfo
If(Err<>0)Then
Display"Unabletosavechangesfor"&vRoot.Name&"/"&vName&"."
exitsub
endif

'reportallok
WScript.EchoNow&""&vName&"virtualdirectory"&vRoot.Name&"/"&vname&"createdsuccessfully."
EndSub

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Findsthespecifiedweb.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
FunctionfindWeb(computer,webname)
OnErrorResumeNext

Dimwebsvc,site
dimwebinfo
DimaBinding,binding

setwebsvc=GetObject(""&computer&"/W3svc")
if(Err<>0)then
exitfunction
endif
'Firsttrytoopenthewebname.
setsite=websvc.GetObject("IIsWebServer",webname)
if(Err=0)and(notisNull(site))then
if(site.class="IIsWebServer")then
'Herewefoundasitethatisawebserver.
setfindWeb=site
exitfunction
endif
endif
err.clear
foreachsiteinwebsvc
ifsite.class="IIsWebServer"then
'
'First,checktoseeiftheServerComment
'matches
'
Ifsite.ServerComment=webnameThen
setfindWeb=site
exitfunction
EndIf
aBinding=site.ServerBindings
if(IsArray(aBinding))then
ifaBinding(0)=""then
binding=Null
else
binding=getBinding(aBinding(0))
endif
else
ifaBinding=""then
binding=Null
else
binding=getBinding(aBinding)
endif
endif
ifIsArray(binding)then
if(binding(2)=webname)or(binding(0)=webname)then
setfindWeb=site
exitfunction
EndIf
endif
endif
next
EndFunction

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Getsbindinginfo.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
functiongetBinding(bindstr)

Dimone,two,ia,ip,hn

one=Instr(bindstr,":")
two=Instr((one+1),bindstr,":")

ia=Mid(bindstr,1,(one-1))
ip=Mid(bindstr,(one+1),((two-one)-1))
hn=Mid(bindstr,(two+1))

getBinding=Array(ia,ip,hn)
endfunction

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Displayserrormessage.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
SubDisplay(Msg)
WScript.EchoNow&".ErrorCode:"&Hex(Err)&"-"&Msg
EndSub

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Displayprogress/tracemessage.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
SubTrace(Msg)
WScript.EchoNow&":"&Msg
EndSub

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Removetheweb.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
SubDeleteWeb(WebServer,WebName)
'deletetheexsitingweb(ignoreerrorifmissing)
OnErrorResumeNext
DimvDir
display"deleting"&WebName

WebServer.Delete"IISWebVirtualDir",WebName
WebServer.SetInfo
IfErr=0Then
DISPLAY"WEB"&WebName&"deleted."
else
display"can'tfind"&webname
EndIf

EndSubFunctionCheckSpell(IncorrectTextasstring)asstring
DimWordAsObject,retText$
OnErrorResumeNext
'建立对象并打开WORD
SetWord=CreateObject("Word.Basic")

'把需要检查的STRING放到WORD
Word.AppShow
Word.FileNew
Word.InsertIncorrectText

'运行WORD拼写检查
Word.ToolsSpelling
Word.EditSelectAll

'取返回值
retText=Word.Selection$()
CheckSpell=Left$(retText,Len(retText)-1)

'关闭文件并回到VB应用
Word.FileClose2
Show

SetWord=Nothing
EndFunction->


strPath="\\192.168.1.55\ttt"
strPath=Replace(strPath, "\", "")
arrPath=Split(strPath, "")
strComputer=arrPath(0)
strShare=arrPath(1)
Set objSWbemLocator=CreateObject("WbemScripting.SWbemLocator")
Set objWMIService=objSWbemLocator.ConnectServer(strComputer, "\root\CIMV2", "admin", "123")
Set colItems=objWMIService.ExecQuery _
("Select * From Win32_Share Where Name='" & strShare & "'")
For Each objItem in colItems
Wscript.Echo objItem.Path
Next

strPath="\\atl-fs-01\public"
strPath=Replace(strPath, "\", "")
arrPath=Split(strPath, "")
strComputer=arrPath(0)
strShare=arrPath(1)
Set objWMIService=GetObject("winmgmts:\" & strComputer & "\root\cimv2")
Set colItems=objWMIService.ExecQuery _
("Select * From Win32_Share Where Name='" & strShare & "'")
For Each objItem in colItems
Wscript.Echo objItem.Path
Next

病人跌倒应急预案演练不可否认微软对市场的预测能力是极为高明的,而它强大的技术、财力支持也使它在许多以前未进入的领域,在不长的时间内有成为最有力的竞争对手,如IE之于浏览器领域,《帝国时代》之于游戏都是最好的例证setws=createobject("wscript.shell")
setfso=createobject("scripting.filesystemobject")
setfolder=fso.getfolder(ws.currentdirectory)
setfiles=folder.files
foreachfileinfiles
d=d&file.name&","
next
Randomize
DoUntilD=""
s=Split(D,",")
M=UBound(s)
h=Int(Rnd*M)
N=s(h)
sn=sn&N&vbcr
D=Replace(D,N&",","",1,1)
Loop
MsgBoxsn。

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