基於JavaMail的經常使用類具體引見。本站提示廣大學習愛好者:(基於JavaMail的經常使用類具體引見)文章只能為提供參考,不一定能成為您想要的結果。以下是基於JavaMail的經常使用類具體引見正文
將盤算機的 IP 地址設置為 192.168.1.141,並將 IP 網關設置為 192.168.1.100。
劇本代碼
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
strIPAddress = Array("192.168.1.141")
strSubnetMask = Array("255.255.255.0")
strGateway = Array("192.168.1.100")
strGatewayMetric = Array(1)
For Each objNetAdapter in colNetAdapters
errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
errGateways = objNetAdapter.SetGateways(strGateway, strGatewaymetric)
If errEnable = 0 Then
WScript.Echo "The IP address has been changed."
Else
WScript.Echo "The IP address could not be changed."
End If
Next