The processes by which SMS objects are managed can be divided into the following categories:
- Creating an SMS object
- Modifying an SMS object
- Deleting an SMS object
- Calling a method on an SMS object
For more information on creating and deleting WMI objects, see the <linktext xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"></linktext>WMI SDK.
To create an SMS object
-
<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"></content>
Connect to an SMS Provider, and get the SWbemServices object.
-
<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"></content>
Create an instance of an SMS object by using the <linktext xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"></linktext>SpawnInstance method supported by the desired class. For example, to create an instance of a package object (SMS_Package), use the following code:
Set objNewPackage = objSWbemServices.Get("SMS_Package").SpawnInstance_() |
-
<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"></content>
Populate the required properties. For example, the following code sets the properties for a package:
objNewPackage.Name = "Package Name"
objNewPackage.Description = "A new package"
objNewPackage.PkgSourceFlag = 2
objNewPackage.PkgSourcePath = "C:\temp" |
-
<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"></content>
Save the SMS object by using the <linktext xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"></linktext>Put_ method supported by the SMS object class. For example, the following line of code puts or saves a package:
To modify an SMS object
-
<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"></content>
Get the instance of the required SMS object by using the Windows Script Host GetObject method and supplying the path to the required object. For example, to get an instance of an advertisement object (SMS_Advertisement) identified as 99920002
, use the following code.
Set objAdvertisement = GetObject( "WinMgmts:root\SMS\site_999:SMS_Advertisement.AdvertisementID='99920002'") |
-
<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"></content>
Set the required properties of the SMS object. To enable the assigned schedule for an advertisement object, set the AssignedScheduledEnabled property to True, as in the following example:
objAdvertisement.AssignedScheduleEnabled=True |
-
<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"></content>
Update the SMS object by using the SMS object class Put method. For example, to update the advertisement opened in step 1, use the following code:
To delete an SMS object
-
<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"></content>
Get the instance of the required SMS object by using GetObject and supplying the path to the required object. For example, to get an instance of an advertisement object (SMS_Advertisement) identified as 99920003
, use the following code:
Set objAdvertisement = GetObject( "WinMgmts:root\SMS\site_999:SMS_Advertisement.AdvertisementID='99920003'") |
-
<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"></content>
Delete the SMS object instance by using the SMS object class <linktext xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"></linktext>Delete_ method. For example, to delete the advertisement object opened in step 1, use the following code:
分享到:
相关推荐
smsapi-pl 针对node.js的SMSAPI.pl的实现使用此程序包,您可以轻松地通过波兰提供程序发送SMS 0.2.0版消息: 添加发送承诺用法: $npm install smsapi-pl然后: var sms = require ( 'smsapi-pl' ) ; 您可以放入sms...
Microsoft SMS 2003 客户能够借助面向 SMS 的英特尔 AMT 插件,充分利用采用英特尔:registered: 博锐:trade_mark: 技术的个人电脑中强大的可管理特性。凭借这些硬件功能,即使电脑关机或操作系统无法使用,IT 管理员...
function Sms_Send(Sms_TelNum:string;Sms_Text:string):integer;stdcall;external 'sms.dll'; Function Sms_Receive(Sms_Type:string;var Sms_Text:PChar):integer;stdcall;external 'sms.dll'; function Sms_...
开启企业管理新篇章系列之四:安装SMS 2003
VC++:SMS短信测试: 实现短信的收发,
Nexmo SMS动作 使用从发送短信。 用法 name : Push to master on : [push] jobs : send - sms : name : Send SMS runs - on : ubuntu - latest steps : - name : Send SMS uses : nexmo - community / nexmo -...
Laravel 包提供 SMS API 集成。 可以使用任何提供 REST API 的 SMS 供应商。 回购以显示支持 :smiling_face_with_smiling_eyes: 安装 安装包 需要 Composer 这个包: composer require gr8shivam/laravel-sms-api...
亿美短信发送SDK
开启企业管理新篇章系列之十四:SMS 2003 Troubleshooting (上)
赠送jar包:aliyun-sms-spring-boot-starter-2.0.2.jar 赠送原API文档:aliyun-sms-spring-boot-starter-2.0.2-javadoc.jar 赠送源代码:aliyun-sms-spring-boot-starter-2.0.2-sources.jar 包含翻译后的API文档...
微软 SMS2003 教程 SMS 教程 PDF SMS内部资料 SMS部署详解 SMS部署方法 sms手册
Easy SMS: 发送短信最简单的方法
一个Perl模块,用于通过各种协议(SOAP,XML,HTTP和FTP)访问Clickatell批量SMS服务(http://www.Clickatell.com)。
功能描述:删除指定的短信 Sms_Index:短信的索引号 5、Sms_AutoFlag()As Integer Sms_AutoFlag函数说明如下: 功能描述:检测连接的终端是否支持自动收发短信功能 Sms_AutoFlag:返回值(0:不支持;1:支持)...
功能描述:删除指定的短信 Sms_Index:短信的索引号 5、Sms_AutoFlag()As Integer Sms_AutoFlag函数说明如下: 功能描述:检测连接的终端是否支持自动收发短信功能 Sms_AutoFlag:返回值(0:不支持;1:支持)...
赠送jar包:aliyun-sms-spring-boot-starter-2.0.2.jar; 赠送原API文档:aliyun-sms-spring-boot-starter-2.0.2-javadoc.jar; 赠送源代码:aliyun-sms-spring-boot-starter-2.0.2-sources.jar; 赠送Maven依赖信息...
中国网建提供的SMS短信平台http://sms.webchinese.cn 需要的可以看一下
java开发sms的资料大全:包含源码和sms、短信猫的相关资料,很全。
Twilio功能:直接创建任务短信聊天概述当代理商需要向客户发送出站SMS消息时,可能希望让他们使用库存的Flex UI聊天界面发送消息。 该Twilio功能通过为座席创建聊天任务并设置后端资源,使座席添加到聊天中的消息...
ShareSDK分享和SMS的使用 http://www.cnblogs.com/wangfengdange/p/7800146.html