set environment variable path windows 10 command line code example Example: set environment variable windows command line setx EC2_CERT "%USERPROFILE%\aws\cert.pem"