regPrependToPath function

void regPrependToPath(
  1. String newPath
)

Prepend newPath to the Windows PATH environment variable.

A WindowsException is thrown if the call falls.

Implementation

void regPrependToPath(String newPath) {
  final paths = _getPaths();

  if (!_isOnUserPath(newPath, paths)) {
    paths.insert(0, newPath);
    _replacePath(paths);
  }
}