Suppose I have following entry in hosts.cfg file:

1.2.3.4 test # foo machine

I start script that every second call ping test and cat \\test\share\machine-name.txt

Script output: IP: 1.2.3.4; machine name: foo

Then I change hosts.cfg to following:

1.2.3.5 test # bar machine

Now script output is following: IP: 1.2.3.5; machine name: foo # bar is expected!

Problem: \\test\share\machine-name.txt still points to old location

I've found only one solution how to resolve this problem: restart LanmanWorkstation service. But the problem with LanmanWorkstation service is that it takes too much time to restart and sometimes it completely hangs on stop operation.

Question: how to clear/reset Windows SMB cache? Something like ipconfig /flushdns

Thanks

link|improve this question
feedback

1 Answer

is it possible that they're being stored in the NetBios Resolver Cache?

To check try:

nbtstat -c

if that turns out to be the problem, the following will restart it.

nbtstat -R
link|improve this answer
Unfortunately it is not NetBios Resolver Cache issue – Roman Nov 3 '11 at 16:38
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.