Skip to main content
[[env]] sets environment variables when the app is installed. A per-user install sets them for the user (HKCU\Environment), a machine-wide install for the computer. Programs started after the install see them; programs that are already running do not.
bach.toml

What setup does

  • A value with a %VARIABLE% in it is stored so Windows fills it in when it is read.
  • An update takes back variables the new version no longer lists.
  • Removing the app removes a variable only while it still holds the value setup set.
  • Names that Windows uses are refused: PATH, PATHEXT, TEMP, TMP, USERPROFILE, APPDATA, LOCALAPPDATA, SYSTEMROOT, WINDIR and the like, PROCESSOR_* and BACH_*. PATH has its own setting, add_to_path, in [installer].
  • Variables that load code into other programs or redirect their traffic are refused whatever allow says: the COR_* and CORECLR_* profiler settings, DOTNET_STARTUP_HOOKS, JAVA_TOOL_OPTIONS, _JAVA_OPTIONS, NODE_OPTIONS, PYTHONSTARTUP, PYTHONPATH, PERL5OPT, HTTP_PROXY, HTTPS_PROXY, NODE_EXTRA_CA_CERTS, SSL_CERT_FILE, SSLKEYLOGFILE, LD_PRELOAD and a few more.
  • A name can be set only once.
  • bach inspect lists each variable as Variable.