Setting IP-properties.

Mark Wieder mwieder at ahsoftware.net
Sun Dec 14 02:06:28 EST 2003


Gunnar-

Saturday, December 13, 2003, 2:04:56 PM, you wrote:

GW> The system is W2k. The application is to be used by service tecnicians
GW> moving around between different equipments, each with a unique IP-adress.
GW> The equipment does not have a DHCP so we need to set the IP-adress of the
GW> PC, to have it on the same IP-network as equipment. This also means that the
GW> change does not need to survive a reboot. The PCs only got one adaptor.
GW> I'll try with setRegistry.. Problem is just in which position of the
GW> register to make the setting.

Ah, the joys of the Windows registry.

I think what you're looking for is

KeyName:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\{AdapterName}\Parameters\Tcpip
where {AdapterName} will depend on what's in your system
My AdapterName is {5B367B63-49D6-4FF9-9D7D-655AD12F9B39}

ValueNames:
IPAddress
SubnetMask
DefaultGateway

I don't see any way out of hard-coding the adaptername strings into an
array.

However, I should point out that you have to restart after making
these changes in order for them to take effect. All networking changes
are established prior to logon. This makes the changes more or less
permanent, or at least until the next time they're changed. If you
have to go through all this it's probably easiest just to pop open the
Network control panel to make the changes.

-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list