Day: November 26, 2019

  • Setx Environment Variables

    By default setx sets the variable in the local environment (Under HKEY_Current_User Registry key). If you want to set the system variable (Under HKEY_LOCAL_MACHINE registry key), use the flag /m. The set command only sets the environment variable for the current session. The setx command sets it permanently, but not for the current session. If you want to set it for current as well as future sessions, use both setx and set. Example: SETX /M INCLUDE C:\IBM\SQLLIB\LIB SETX /M CLASSPATH .;C:\IBM\SQLLIB\java\db2java.zip;C:\IBM\SQLLIB\java\db2jcc.jar;C:\IBM\SQLLIB\java\db2cc_license_cu.jar;C:\IBM\SQLLIB\bin;C:\IBM\SQLLIB\java\common.jar Append to Path use %PATH% SETX /M PATH “%PATH%;X:\win32\install\bin;X:\win32\install\core\CO_ORBIX\bin;X:\win32\install\core\CO_JDK\bin” Set environment variable by Registry edit If your PATH variable is too long, then the best method would be…