LMHosts file missing on Windows CE! But – no need to worry….

27 09 2010

Sometimes, it comes in handy to work with some static entries in a DHCP environment, e.g. if no DNS Server is available.
On a desktop system this is not a problem. One can always add the desired entries in a file called lmhosts, which actually is a dinosaur configuration file. Its history reaches back into the early beginnings of TCP/IP!
You can find it in C:\Windows\System32\drivers\etc.

On Windows CE this is completely different. There is no lmhosts file, instead a registry key can be used to map IP addresses to DNS names.
Unfortunately the handling is a bit more complicated than simple file editing on desktop.

Be aware that the registry keys must have the correct type, for example RegBinary for IPAddress and must be filled with corresponding settings.
In case of the IPAdress you need to convert the IP Octet numbers into hexadecimal data: 192.168.0.4 then is C0A80004.

If a machine called AlexsWebserver needs to be statically mapped the key looks similar to this:

Key:
HKEY_LOCAL_MACHINE\Comm\Tcpip\Hosts\AlexsWebserver

Values:
IPAddress(RegBinary) C0A80004 (4 Bit)
ExpireTime(RegBinary) FFFFFFFFFFFFFFFF (8 Bit)

Of course in a non-lab environment the use of lmhosts is depreciated. It can be a real nuisance whiletroubleshooting, when an address has changed and the old mapping was left forgotten in that file.

Very hard to find!

Alexander


Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: