Last active
October 23, 2016 07:30
-
-
Save CountChu/1b5b7dbba37c6d968040437986ce8f67 to your computer and use it in GitHub Desktop.
Use Python to change a system environment variable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python ChgEnv.py %1 | |
call Temp.bat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
File = open ("Temp.bat", "w+") | |
File.write ("set DDD=%s\n" % sys.argv [1]) | |
File.close () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment