中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-08-02 03:32
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 麻烦总结关于"Microsoft.CmdLib"详细所有的属性,方法. 查看 1,256 回复 3
楼 主 麻烦总结关于"Microsoft.CmdLib"详细所有的属性,方法. 发表于 2006-08-22 19:07 ·  中国 江苏 苏州 电信
中级用户
★★
过度热情
积分 321
发帖 139
注册 2006-03-21 17:19
20年会员
UID 52521
性别 男
状态 离线
目前我在一vbs中看到有"Microsoft.CmdLib"这个对象.如下面代码所示.
感觉他的ScriptingHost,checkScript() 分别是设置脚本执行的是cscript,还是wscript,并检查设置.
我在网上没有查到更多的关于Microsoft.CmdLib"对象的属性,和方法.麻烦大家总结一下这个对象所有的属性,方法.


Set component = CreateObject( "Microsoft.CmdLib" )

If Err.Number Then
WScript.Echo(L_InfoUnableToInclude_ErrorMessage)
WScript.Quit(EXIT_METHOD_FAIL)
End If

Set component.ScriptingHost = WScript.Application

If CInt( component.checkScript() ) <> CONST_CSCRIPT Then
WScript.Echo (UseCscriptErrorMessage)
WScript.Quit(EXIT_UNEXPECTED)
End If
2 发表于 2006-08-22 20:31 ·  中国 北京 顺义区 联通
银牌会员
★★★
DOS联盟捡破烂的
积分 1,144
发帖 425
注册 2005-10-20 00:00
20年会员
UID 43784
来自 北京
状态 离线
progid = Microsoft.CmdLib

Method Name Description
CheckScript used to find whether CScript is used or not
vbPrintf Simulates the Printf function
getHostName used to get the current Host name
getUserName used to get the current User Name
getDomainName used to get the current Domain name
getPassword used to get the password from the user
trapError Reports error with a string saying what the error occurred in
getArguments used to get the arguments into appropriate variables
wmiConnect used to connect to wmi provider with the given credentials
packString Attaches spaces to a string to increase the length to intWidth
getMaxStringLen used to get length of the maximum length string in an array of strings
showResults used to show results in the desired format
validateDateTime To validate the date-time format specified
changeToWMIDateTime To format the given date-time
matchPattern checks whether a given value matches a particular pattern
3 发表于 2006-08-22 23:26 ·  中国 四川 成都 教育网
铂金会员
★★★★
积分 7,493
发帖 2,672
注册 2005-09-02 00:00
20年会员
UID 42173
性别 男
状态 离线
翻 MSDN

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
4 Microsoft.CmdLib类库的来源,方法和属性 发表于 2006-09-19 09:01 ·  新加坡 腾讯云
初级用户
积分 73
发帖 30
注册 2006-09-18 08:35
19年会员
UID 62944
状态 离线
'''本类库的来源,方法和属性如下,欢迎早日写出代码来供大家学习!
'''-------------浙江 墨伯[MOBO]
Library Scriptlet
C:\WINDOWS\system32\scrobj.dll
Microsoft Scriptlet Library

Sub AddURL(ByVal bstrURL As String)
Scriptlet.IGenScriptletTLib 的成员
Add a new scriptlet to the type library
Sub attachNotification(ByVal pdispHandler As Object)
Scriptlet.DIBehaviorHandlerOM 的成员
Function createEventObject() As Object
Scriptlet.DIBehaviorHandlerOM 的成员
Property Doc As String
Scriptlet.IGenScriptletTLib 的成员
The documentation for the type library
Property element As Object
只读
Scriptlet.DIBehaviorHandlerOM 的成员
Sub fireEvent(ByVal bstrEvent As String, [ByVal pdispEventObject As Object])
Scriptlet.DIBehaviorHandlerOM 的成员
Property GUID As String
Scriptlet.IGenScriptletTLib 的成员
The GUID for the type library
Property MajorVersion As Unsigned Integer
Scriptlet.IGenScriptletTLib 的成员
The major version number of the type library
Property MinorVersion As Unsigned Integer
Scriptlet.IGenScriptletTLib 的成员
The minor version number of the type library
Property Name As String
Scriptlet.IGenScriptletTLib 的成员
The name of the type library
Property Path As String
Scriptlet.IGenScriptletTLib 的成员
The path to the type library
Sub Reset()
Scriptlet.IGenScriptletTLib 的成员
Forget all the scriptlets added so far and start over.
Sub Write()
Scriptlet.IGenScriptletTLib 的成员
Write the type library out to disk.
'''应该说,还不算是很多的,比起FSO要好多了!
论坛跳转: