anchor.diff:  :# Note: The XP version of setx.exe requires the option -m or -M, but fails with /M. The Win7 version supports all.
   if "%~1"=="-s" set "OBJECT=MasterPath" & set "SETXOPT=-M" & set "MKEY=%MENVKEY%" & set "OWNER=system" & goto :next_arg
   if "%~1"=="-t" set "WHERE=tail" & goto :next_arg
  +if "%~1"=="-tb" goto :TestBroadcast
   if "%~1"=="-u" set "OBJECT=MasterPath" & set "SETXOPT=" & set "MKEY=%UENVKEY%" & set "OWNER=user" & goto :next_arg
   if "%~1"=="-v" set "VERBOSE=1" & goto :next_arg
   if "%~1"=="-V" (echo.%VERSION%) & exit /b
  
positive.code: if not defined PATHVAR set "PATHVAR=PATH"
  goto :%OBJECT%.%METHOD%
  
  :#----------------------------------------------------------------------------#
  
  :LocalPath.Echo %1=Optional variable name. Default=PATHVAR
  
negative.code: ) else (		:# NoExec mode. Just echo the command to execute.
    echo %CMD%
  )
  :# If the update was done with reg.exe, we need to tell Windows Explorer about the change
  if "%NEED_BROADCAST%"=="1" (
    :# Find a way to broadcast a WM_SETTINGCHANGE message
    set "CMD="
    if defined SETX ( :# If setx.exe is in the PATH, then use it. (Preferred, as this is faster)
      :# setx.exe updates _does_ broadcast a WM_SETTINGCHANGE to all apps
      :# Note: The XP version of setx.exe requires the option -m or -M, but fails with /M. The Win7 version supports all.
      :# Change a system variable, for both cases of the user or system PATHs.
      set "VAR=PROCESSOR_ARCHITECTURE" &:# This system variable is always short, and is unlikely to ever change
      set ^"CMD=setx !VAR! -k "%MENVKEY%\!VAR!" -m^"
    ) else ( :# If powershell.exe is in the PATH, then use it to run the PS routine at the send of this script. (Slower)
      for /f %%i in ("powershell.exe") do set "POWERSHELL=%%~$PATH:i"
      if defined POWERSHELL set ^"CMD=powershell -c "Invoke-Expression $([System.IO.File]::ReadAllText('%SFULL%'))"^"
    )
    if defined CMD (
      if "%NOEXEC%"=="0" (	:# Normal execution mode
        :# Redirect the "SUCCESS: Specified value was saved." message to NUL.
        :# Errors, if any, will still be output on stderr.
        if "%VERBOSE%"=="1" echo :# !CMD!   ^&:# Broadcast a WM_SETTINGCHANGE message
        !CMD! >NUL
      ) else (		:# NoExec mode. Just echo the command to execute.
        echo !CMD!   ^&:# Broadcast a WM_SETTINGCHANGE message
      )
    ) else if "%QUIET%"=="0" ( :# Only happens in Windows XP or Windows 7 without setx.exe and PowerShell
      echo Warning: Could not find a way to broadcast the change to other applications.
      echo New shells will only have the updated PATH after you log off and log back in.
    )
  )
  if "%NOEXEC%"=="0" if "%QUIET%"=="0" goto :MasterPath.Echo
  exit /b
  
  