JSI Tip 8580. How do I prevent a 'server' from notifying clients that file and/or folder information on the server's shares has changed?


When your computer serves shares to client computers, Windows Explorer uses SMBs (Server Message Blocks) to post a NTNotifyDirectoryChange to connected clients.

If you wish to reduce network traffic, you can turn off Change Notify requests for a user, or for the client computer.

I have script NoChangeNotify.bat to turn of Change Notify requests.

The syntax for using NoChangeNotify.bat is:

NoChangeNotify \[/U or /C\]

Where:

/U turns off Change Notify requests for the current user. If no switch is specified, /U is the default.

/C turns off Change Notify requests for all users of the current computer.

NOTE: Windows XP SP2 includes the code to process the NoRemoteChangeNotify Value Name. For Windows XP SP1, and Windows 2000 SP3 and greater, you need the 812669 hotfix.

NoChangeNotify.bat contains:

@echo off
setlocal
set sw=%1
if "%sw%" EQU "" set sw=/U
if /i "%sw%" EQU "/U" goto user
if /i "%sw%" EQU "/C" goto computer
@echo Syntax: NoChangeNotify /U or /C
endlocal
goto :EOF
:user
set key=HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
goto common
:computer
set key=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
:common
(
@echo REGEDIT4
@echo.
@echo \[%key%\]
@echo "NoRemoteChangeNotify"=dword:00000001
@echo.
@echo.
)>"%TEMP%\NoRemoteChangeNotify.tmp"
regedit /s "%TEMP%\NoRemoteChangeNotify.tmp"
del /q "%TEMP%\NoRemoteChangeNotify.tmp"
endlocal



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish