Command endlocal added. Ends localization of environment changes in a batch file, restoring environment variables to their values before the matching setlocal command.