提示:Home版XP无wmic~~~
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'>"
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
Originally posted by willsort at 2006-7-21 21:56:
Re buddiyar:
wmic 显然不是内部命令,但它是WinXP/03的缺省安装组件,首次运行wmic时,会提示进行安装以完成配置,以后可以在cmd或批处理中直接使 ...
Originally posted by gmy at 2006-9-11 21:06:
“可移动磁盘”的字符判断没有考虑到USB-HDD(本地硬盘)的情况。
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colEvents = objWMIService.ExecNotificationQuery ("Select * From __InstanceOperationEvent Within 5 Where " _
& "TargetInstance isa 'Win32_LogicalDisk'")
Do While True
Set objEvent = colEvents.NextEvent
If objEvent.TargetInstance.DriveType = 3 Then
If objEvent.Path_.Class = "__InstanceCreationEvent" Then
newdri = objEvent.TargetInstance.DeviceId
Wscript.Echo "新增磁盘盘符为: " & newdri
End If
End If
Loop