appendToPATH method

bool appendToPATH(
  1. String path
)

Appends path to the end of the PATH by updating the Windows Registry. We update the user's PATH (HKEY_CURRENT_USER) rather than the system path so this change will only affect the logged in user.

Note: this doesn't update current scripts PATH.

In almost all shells you will need to restart the terminal in order for the path change to take affect.

Implementation

bool appendToPATH(String path) {
  regAppendToPath(path);
  return true;
}