Hello there,

I want to add an entry to the lmhosts file

Ex : 123.321.123.321 arg1 #PRE


I need a simple code that do that and something that does the nbtstat -R Job because i need to purge it.

If i use in cmd nbtstat -R it says something like : Failed to Purge the NBT Remote Cache Table.

Recommended Answers

All 4 Replies

If you are doing this in Windows 7 or Vista, did you start the command prompt as administrator?

http://support.microsoft.com/kb/160827

Is the file named correctly and residing in the main windows directory?
... with NO EXTENSION ...

like:
c:\WINDOWS\LMHOSTS
or
C:\WINNT\LMHOSTS
or
C:\WINXP\LMHOSTS

Uh :D i have only on in the system32/drivers/etc thanks for that answer :d

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.