As I recall SETLOCAL/ENDLOCAL bracketed an area in a batch file in which environment variables could be temporarily set to different values from the "global" ones with the same name.
Any programs that this instance of the command shell runs in between these brackets would see the temporary environment variables instead of the real or "global" values.
I can't see the value of this in a WSH script, and even if the script was doing something like executing external programs via WShell.Run I don't think it'd have any effect.
Don't these programs normally run under a new instance of the command shell? Guess I can't be sure of that.
Then again, maybe I'm remembering wrong and SETLOCAL/ENDLOCAL is for something else.