With enabled delayed variable expansion, the exlamation point character specifies to substitute the value of an environment variable at run time rather than at »compile« time.
When cmd.exe is started, delayed variable expansion is enabled or disabled by giving either the /v:on or /v:offoption.