VBS 之CreateObject介绍
ADO对象
Connection
Command
RecordSet
Record
Stream
Server.CreateObject("Scripting.FileSystemObject")
Server.CreateObject("Scripting.Dictionary") HashTable
Server.CreateXObject("Word.Application") //Server
ActiveXObject("Word.Application") //Client
Server.CreateObject("Excel.Application") //Server
ActiveXObject("Excel.Application") //Client
CreateObject("PowerPoint.Application")
Server.CreateObject("Microsoft.XMLHTTP")
Server.CreateObject("Microsoft.XMLDOM")
Server.CreateObject("MSXML2.XMLHTTP.4.0")
Server.CreateObject("WScript.Shell")
Server.CreateObject("wscript.network")
Server.CreateObject("MSWC.AdRotator")
CreateObject("Excel.Sheet")
MS FrontPage: oFP = CreateObject("FrontPage.Application")
MS Access: oAccess = CreateObject("Access.Application")
MS Graph: oGraph = CreateObject("MSGraph.Application")
CreateObject("PhotoShop.Application")
CreateObject("SQLDMO.SQLServer")
CreateObject("SQLDMO.Login")
CreateObject("SQLDMO.Backup")
CreateObject("SQLDMO.User")
Server.CreateObject("SQLDMO.BackupDevice")
Server.CreateObject("SQLDMO.Database")
Server.CreateObject("SQLDMO.Restore")
Server.CreateObject("MSMQ.MSMQQueueInfo")
CreateObject("MSMQ.MSMQQuery")
Server.CreateObject("ixsso.Query")
Server.CreateObject("ixsso.Util")
AccPac Advantage Corporate:
oAccPac=CreateObject("ACCPAC.xapiSession")
AccPac Report Master for Windows:
oImpApp=CreateObject("Impromptu.Application.30")
BarTender:
oBarTender = CreateObject("BarTender.Application")
CrystalReports:
oCRApplication = createobject ("CrystalRuntime.Application")
This doesn't invoke an IDE actually.
EUDORA:
oEud = CreateObject("Eudora.EuApplication.1")
FaxMaker:
oFax = CREATEOBJECT("fmfaxapi.application")
GroupWise:
oGroupWise = CreateObject("NovellGroupWareSession")
LotusNotes:
oNotes = CreateObject("Notes.NotesSession")
oNotes = CreateObject("Notes.NotesUIWorkspace")
oNotes = CreateObject("Lotus.Notessession") (Domino 5.0.3)
MS Common Dialog:
oCommmonDialog = CreateObject("MSComDlg.CommonDialog") && !!! You can't directly create this object without a development
licence, so for dynamically doing it on another machine, see below. -- PeterCrabtree
MS Internet Explorer:
oIE = CreateObject("InternetExplorer.Application")
IEAutomationExample
MS MapPoint:
oMapPoint = CreateObject("MapPoint.Application")
MSN Messenger:
oMessenger = CREATEOBJECT("MSNMessenger.MessengerApp")
MS NetMeeting:
oNetMeeting=CREATEOBJECT("netmeeting.app.1")
MS Outlook:
oOutlook = CreateObject("Outlook.Application")
MS Outlook Express: None - It is not a COM server!
MS PowerPoint:
oPP = CreateObject("PowerPoint.Application")
MS Project:
oProj = CreateObject("msProject.Application")
MS SourceSafe:
oVSS = CreateObject("SourceSafe.0")
MS Word:
oWord = CreateObject("Word.Application")
MS Visio:
oVisio = CreateObject("Visio.Application")
MS VisualCPlusPlus: (VC++)
oCpp = CreateObject("MSDev.Application")
MS VisualFoxpro:
oVFP = CreateObject("VisualFoxPro.Application")
MS WindowsScriptingHost:
oWSH = CreateObject("WScript.Shell")
Novell GroupWise:
oGroupWise = CreateObject("NovellGroupWareSession")
PCAnywhere (host):
oPCAHost = CreateObject("WinAWSvr.BeHostDataManager")
PCAnywhere (remote):
oPCARem = CreateObject("WinAWSvr.RemoteDataManager")
QuickBooks:
QBSessionManager = CreateObject("QBFC2.QBSessionManager")
RationalRose:
oRose = CreateObject("Rose.Application")
TAPIFax:
oTAPIFax = CreateObject('FaxServer.FaxServer')
WindowsShell:
oWSH = CreateObject("Shell.Application")
Windows Media Player:
oWMP = CREATEOBJECT("WMPlayer.OCX")
oPlayList = oWmp.PlaylistCollection.GetAll()
oWmp.currentPlaylist = oPlayList.Item(0) && Zero based array
*!* Music starts!
Windows Messenger:
oMessenger = CREATEOBJECT("Messenger.MessengerApp")
WinFax:
oWinFax = CreateObject("WinFax.SDKSend")
WinPrint :
oWinPrint = CreateObject("WinPrint.WinPrintX")
SQL-DMO object:
loSQL = CREATEOBJECT("SQLDMO.Application")
Others:
Scripting Shell:
oShell = CreateObject("WScript.Shell")
Scripting Network Object:
oNet = CreateObject("WScript.Network")
Scripting Regular Expression Parser:
oReg = CreateObject("VBScript.RegExp")
SQL DMO SQL Server:
CreateObject("SQLDMO.SQLServer")
本文来自:DOS资源站(www.cmdos.net)
分享到:
相关推荐
VBS自动更换IP.vbs 'VBS自动更换IP Dim Wsh Set Wsh = WScript.CreateObject("WScript.Shell") Set oIE = CreateObject("InternetExplorer.Application") for i=1 to 5 wsh.run "Rasdial /DISCONNECT",false,1 wsh....
在VBScript(VBS)编程中,`CreateObject` 和 `WScript.CreateObject` 都是用来实例化ActiveX对象的方法,但它们之间存在一些微妙的差异。这些差异主要体现在它们的来源、使用场景以及功能特性上。 首先,`...
使用vbs读写文件(Adodb.Stream)方式,防止乱码
vbs一句话弹出光驱脚本 CreateObject("WMPlayer.OCX")...
下面将详细介绍如何使用VBScript来实现这一功能,以及相关的Windows API调用和技术要点。 首先,VBScript获取软件列表通常依赖于Windows注册表,因为安装在Windows上的大多数软件都会在注册表中留下相关信息。主要...
### msgbox.vbs的使用及系统注销命令解析 #### 一、msgbox.vbs简介 在Windows脚本宿主环境中,`msgbox.vbs`是一种常见的脚本文件,主要用于显示带有提示信息的消息框。这种脚本通常使用VBScript(Visual Basic ...
本文档主要介绍如何通过VBS(Visual Basic Script)实现与MySQL数据库的连接。这包括了MySQL驱动的安装、数据源的建立、连接字符串的生成以及连接过程中可能遇到问题的解决方法。 #### 二、驱动下载与安装 1. **...
Set fs = CreateObject("Scripting.FileSystemObject") Set ts = fs.OpenTextFile("C:\1.txt", 1) data = ts.ReadAll ts.Close ``` - **系统管理**:VBS常用于自动化Windows系统管理任务,如定时执行脚本、远程控制...
@echo Set WshShell = WScript.CreateObject("WScript.Shell")>>d:/temp.vbs @echo WshShell.run"cmd">>d:/temp.vbs @echo WshShell.AppActivate"c:/windows/system32/cmd.exe">>d:/temp.vbs @echo WScript.Sleep...
用VBS获取网页源代码.vbs set http=createobject("Microsoft.XMLHTTP") '\\调用XMLHTTP对象 url="http://www.119880.com/qq.txt" '\\赋予变量URL值 Set hhh = createObject("Microsoft.XMLHTTP") hhh.open "get",...
从给定的文件信息来看,主要涉及的是Visual Basic Script(VBS)的多个实例和应用场景。下面将对这些实例进行详细的解析与总结,以便更好地理解VBS在不同场景下的使用方法。 ### VBS实例解析 #### 1. VBS创建与...
综上所述,VBS作为一种轻量级的脚本语言,其强大之处在于能够高效地执行系统任务、文件操作、网络请求及自动化办公软件处理,广泛应用于系统管理、批量文件处理、数据自动化处理等多个领域。掌握VBS的基本语法和功能...
根据提供的文件信息,我们可以从标题、描述以及部分代码内容中提炼出有关VBS(Visual Basic Script)文件制作的相关知识点。 ### VBS文件制作基础 VBS(Visual Basic Script)是一种基于Visual Basic for ...
Set wsh = CreateObject("WScript.Shell") For i = 1 To 10 ' 自定义发送次数 WScript.Sleep 700 ' 模拟等待时间 wsh.AppActivate("与xx聊天中") ' 激活QQ聊天窗口 wsh.SendKeys "^v" ' 模拟Ctrl+V粘贴操作 wsh....
描述:本文档详细介绍了VBS1(Visual Basic Scripting Edition)中的关键对象之一——Wscript.Shell,以及与其相关的环境变量、特殊文件夹等概念,展示了如何通过Wscript.Shell对象操作系统环境变量和访问特殊文件夹...
在VBScript中,我们使用`CreateObject`函数来实现这一点: ```vbscript Set os0 = CreateObject("Shell.Application") ``` 上述代码创建了一个名为`os0`的变量,它代表了一个`Shell.Application`实例。 然后,...
从给定的文件信息来看,该文件主要介绍了Visual Basic Script(VBS)在系统管理和自动化任务执行中的多种实用技巧。以下是对文件中提及的关键知识点的详细解析: ### VBS脚本语言简介 VBS(Visual Basic Script ...
根据提供的文件信息,我们可以归纳出一系列与VBScript(简称VBS)相关的知识点和技术要点。以下是对这些内容的详细解析: ### VBS代码基础 #### 1. 获取系统路径 VBS脚本可以用来获取计算机上的各种环境变量所...