:: Listing 3. Making the Environment Variable Affect the Entire Script Setlocal Set TestVariable=10 Echo %TestVariable% Endlocal