Suppose I have following entry in
126.96.36.199 test # foo machine
I start script that every second call
ping test and cat
IP: 188.8.131.52; machine name: foo
Then I change
hosts.cfg to following:
184.108.40.206 test # bar machine
Now script output is following:
IP: 220.127.116.11; machine name: foo # bar is expected!
\\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