Class CeL.application.OS.Windows.WMI
WMI 的 functions
Defined in: WMI.origin.js.
Constructor Attributes | Constructor Name and Description |
---|---|
null module constructor
|
Method Attributes | Method Name and Description |
---|---|
<static> |
CeL.application.OS.Windows.WMI.CIDR_to_IP(CIDR, IP)
get CIDR data
|
<static> |
CeL.application.OS.Windows.WMI.get_net_info(type)
取得網卡設定的IP地址
|
<static> |
CeL.application.OS.Windows.WMI.set_net_info(to_s, from)
改變網卡的IP地址: change IP, set IP
|
Method Detail
<static>
CeL.application.OS.Windows.WMI.CIDR_to_IP(CIDR, IP)
get CIDR data
- Parameters:
- {Number} CIDR
- CIDR mask bits, 0~32
- {String} IP
- IPv4, e.g., 1.2.3.4
- Since:
- 2010/4/21 22:56:16
- Returns:
- CIDR data
<static>
CeL.application.OS.Windows.WMI.get_net_info(type)
取得網卡設定的IP地址
IP=get_net_info().netif[0].IPAddress[0]; with(get_net_info())alert(UserName+'\n'+Name+'\n'+Workgroup+'\n'+Domain+'\n'+BootupState);
- Parameters:
- type
- default type: ip setted interfaces only, 1: all interfaces, 2: 實體 net interfaces(網路卡,無線)
- Returns:
- Requires:
- WMI_data,VBA_to_JSA
<static>
CeL.application.OS.Windows.WMI.set_net_info(to_s, from)
改變網卡的IP地址: change IP, set IP
set_net_info({IP:'163.16.20.212',Gateway:254}); sl(set_net_info({IP:'163.16.20.30',Gateway:254}));WScript.Quit();
- Parameters:
- to_s
- IP or {IP:''||[], CIDR:24||.CIDR_notation, Subnet:''||[], DNS:''||[], Gateway:254||[], GatewayOrder:''||[]}
- from
- IP or netif No.
- Since:
- 2009/5/7 0:24:5 加強 2010/3/3 10:41:17 a work version
- Requires:
- WMI_data,VBA_to_JSA,JSArrayToSafeArray,CIDR_to_IP
- See:
- Win32_NetworkAdapterConfiguration Class (Windows) 通过 WMI 改变网卡的IP地址 ChangeIP.vbs - 柳永法(yongfa365)'Blog Automating TCP/IP Networking on Clients: Part 1: Introduction 使用 WMI 更改IP、子網路遮罩、閘道、DNS - 強力鎯頭 VB BLOG - 點部落 Using NetSh.exe (no reboot required): WWW Tech Support/WinBatch/How To\Change Ip Address.txt