How to set TCP/IP Network settings in TD?

  • Thread starter Thread starter Mark Kraft
  • Start date Start date
M

Mark Kraft

As it reads:

Can Network settings be configured in Target designer?

Thanks

--
Mark Kraft
Design Engineer
Lehigh Electric Products Co.
Tel: 610-395-3386
Fax: 610-395-7735
email: (e-mail address removed)
website: www.lehighdim.com
 
Mark,

For the most part, no.
However, if you want to set up network setting take a look at netsh.exe
("Network Command Shell" component) tool scripting (or use netsh from a
batch).

We all have done that many times so it is doable.
For an example, you may go to www.xpefiles.com and download Heidi's netsh
script component from there.

Good luck,
KM
 
Mark,
You can also script your network settings. Try this wmi script:

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
strIPAddress = Array("192.168.0.1")
strSubnetMask = Array("255.255.255.0")
arrDNSServers = Array("192.168.0.27")
strGateway = Array("192.168.0.254")
strGatewayMetric = Array(1)
For Each objNetAdapter in colNetAdapters
errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
errGateways = objNetAdapter.SetGateways(strGateway, strGatewaymetric)
errDns = objNetAdapter.SetDNSServerSearchOrder(arrDNSServers)
Next

Regards,

Sean Gahan
 
Back
Top