0
Good morning Gentlemen, I’ve searched the entire Internet, but I don’t think I know how to express myself, so I’ve come to ask you... I have a VB command to change the ip of Win7 but I would like the command to ask which ip I would like to put following command...
' ## Script para alterer ip da Placa de Rede ##
Set objWMIService = GetObject("winmgmts:\.\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
strIPAddress = Array("10.10.0.7") 'Coloque o IP fixo
strSubnetMask = Array("255.255.255.0") 'Coloque a Mascara de SubNet
strGateway = Array("10.1.1.1") 'Coloque o Gateway
strGatewayMetric = Array(1)
strDNS = Array("200.204.0.10","200.204.0.138") 'Coloque o IP DNS
For Each objNetAdapter in colNetAdapters
errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
errGateways = objNetAdapter.SetGateways(strGateway, strGatewaymetric)
objNetAdapter.SetDNSServerSearchOrder strDNS
Next
In part strIPAddress = Array("10.10.0.7") 'Coloque o IP fixo
would like to open a text box for the user to change the end or if it is not possible the whole ip, for example:
10.10.0.___
To display a custom text box you can use the "Microsoft Maked Edit Control" component, with it you can create masks for the text.
– davidterra