How to set TCP/IP Network settings in TD?

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
 
K

KM

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
 
S

Sean Gahan

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top