Monday, January 28, 2013

Adding environment variable from commandline

You can add environment variable using the following command. Just change the TEST_ENV_VAR and it's value with your needs.


reg add HKEY_CURRENT_USER\Environment /v TEST_ENV_VAR /d "C:\evn\var\test" /f


This simple piece of code is very helpful when you are working withe batch(.bat) script.


Note: Make sure you are executing this under Administrator privilege. Otherwise it may not work.


No comments:

Get function name programaticaly - Python

This little piece of code will help you to get the function name programatically. This is very helpful when you are implementing the debug...