* Update docker file build to use new deb linux installers; move Dockefile to .github/workflows since its really only useable from the buildDocker.yml workflow * Fix typo in dockerfile location * remove extraneous " in >>GITHUB_ENV statements * Fix handling of TARGETPLATFORM in Dockerfile * Trying with just one platform * Fix issues with missing man-db in docker build workflow; added man-db to depends in deb builds for linux * Sicthed docker from tightvnc to tigervnc to match oio. This getting the apt package name right. * Going back to single platform to debug this thing * Trying with just arm64 * Removing arm/v7 from docker images. Takes too long to build and just wastes our github actions minutes. This is assuming its a never used feature since docker is not big on raspberry pis and their ilk. * Fix typo in control-linux; update build_deb so that files in /usr/local installed by deb are owned by root; add ubuntu user and nano in docker file for dbebugging; when in draft only create for x86_64 platform * Fix typo in buildDocker.yml * Add sudo to docker image; in docker image ensure that all /usr/local/interlisp files are owned by root * Add securityTypes none to docker entrypoint * Updated docker base to Ubuntu 22.10 to get fixed xrdp; add xrdp to the docker image; updated user permission in docker image; * In Dockerfile make xrdp install noninteractive * Update medley.sh scripts to handle docker case * Fix a couple of typos * BuildDcoker: added pulling latest draft release (if any) when this is a draft docker build; removed checkout of medley code cause its not used * BuildDocker: added medley checkout backin - turns pout its needed by a bunch of actions even though I dont really think they use it * BuildDocker: moved download assets to use gh instaed of a marketplace action becauase that action could not handle draft releases. * Tweaking medley.sh and associated tweaks to work Windows via wsl medley and docker * adding first pass at powershell script for windows docker and wsl * Tuning how Xvnc, medley, and vncviewer handle the various ways of exiting - eg logout vs closing viewer window. * Tuning vncviewer launch to make sure that tty works as expected when medley.sh runs in background * Minor typo fixes and added extra check to use of /run/shm in medley_vnc.sh * Added SSH_KEY secret to buildReleaseIncDocker workflow * Gertting the add SSH_KEY secret into orkflows right this time, hopefully * Adding TERM env variable and setting USER to medley in docker image * Debugging medley.ps1 and adding a couple of arguments * Typo in Dockerfile medley * Synchronizing flag processing and usage for medley.ps1 and medley.sh; refactored medley_args.sh and medley_usage.sh code. * Adding first pass at windows installer * Adding first pass an inno setup script for Windows installation * Update buildLoadup workflow and downloads page for windows installer * Fix typo in buildLoadup * BuildLoadup make sure windows runner uses powershell * Another typo in buildLoadup * Another typo in buildLoadup; damn those double quotes * Updating handling of windows installer in buildLoadup, added vncviewer to medley.iss install * Unknown syntax error in buildLoadup * Another damn typo from double quotes * buildLoadup: fixed loadup job outputs * buidLoadup: fixed bug with COMBINED_RELEASE_TAG; fixed Upload script in windows job to be compatible with actions.script v6. * buidLoadup: upload win installer adapted to find draft releases as well as full releases * BuildLoadup: fixing up javascript in actions in windows job to use / instead of \ in pathname * BuildLoadup: changing win installer update to same action used for other release assets * Fix windows installer file name; in BuildLoadup move update downl;oad page to the Windows runner because uploading the window-installer changes the release download url, so updating the downloads page must be done after the windows installer upload.; General buildLoadup cleanup * Run md2html to update downloads page * Fix typo in build_deb.sh * Removing some leftover crud in medley_usage.sh * Fixing up windows installer a bit, mostly cosmetic * Adding support for WSL1; mostly forcing --vnc and changing how to find open ports and displays since WSL1 networking is different tha WSL2 * Update manual page for new Windows Medley script * First pass done for man page that incorporates new Windows medley script. Add Xvnc wait before calling run-medley in case of docker to prevent occasonal missing X windows server error. * Change buildLoadup to update man page to a draft if this is a draft run.
6.1 KiB
EditPath
EditPath is a Windows console (text-based, command-line) program for managing the system Path and user Path.
Author
Bill Stewart - bstewart at iname dot com
License
EditPath.exe is covered by the GNU Lesser Public License (LPGL). See the file LICENSE for details.
Download
https://github.com/Bill-Stewart/PathMgr/releases/
Background
The system Path is found in the following location in the Windows registry:
Root: HKEY_LOCAL_MACHINE
Subkey: SYSTEM\CurrentControlSet\Control\Session Manager\Environment
Value name: Path
The current user Path is found in the following location in the registry:
Root: HKEY_CURRENT_USER
Subkey: Environment
Value name: Path
In both cases, the Path value is (or should be) the registry type REG_EXPAND_SZ, which means that it is a string that can contain values surrounded by % characters that Windows will automatically expand to environment variable values. (For example, %SystemRoot% will be expanded to C:\Windows on most systems.)
The Path value contains a ;-delimited list of directory names that the system should search for executables, library files, scripts, etc. Windows appends the content of the current user Path to the system Path and expands the environment variable references. The resulting string is set as the Path environment variable for processes.
EditPath provides a command-line interface for managing the Path value in the system location (in HKEY_LOCAL_MACHINE) and the current user location (in HKEY_CURRENT_USER).
Usage
The following describes the command-line usage for the program. Parameters are case-sensitive.
EditPath [options] type action
You must specify only one of the following type parameters:
| type | Abbreviation | Description |
|---|---|---|
| --system | -s | Specifies the system Path |
| --user | -u | Specifies the user Path |
You must specify only one of the following action parameters:
| action | Abbreviation | Description |
|---|---|---|
| --list | -l | Lists directories in Path |
| --test "dirname" | -t "dirname" | Tests if directory exists in Path |
| --add "dirname" | -a "dirname" | Adds directory to Path |
| --remove "dirname" | -r "dirname" | Removes directory from Path |
The following parameters are optional:
| options | Abbreviation | Description |
|---|---|---|
| --quiet | -q | Suppresses result messages |
| --expand | -x | Expands environment variables (--list only) |
| --beginning | -b | Adds to beginning of Path (--add only) |
Exit Codes
The following table lists typical exit codes when not using --test (-t).
| Exit Code | Description |
|---|---|
| 0 | No errors |
| 2 | The Path value is not present in the registry |
| 3 | The specified directory does not exist in the Path |
| 5 | Access is denied |
| 87 | Incorrect parameter(s) |
| 183 | The specified directory already exists in the Path |
The following table lists typical exit codes when using --test (-t).
| Exit Code | Description |
|---|---|
| 1 | The specified directory exists in the unexpanded Path |
| 2 | The specified directory exists in the expanded Path |
| 3 | The specified directory does not exist in the Path |
Remarks
-
Anything on the command line after --test, --add, or --remove is considered to be the argument for the parameter. To avoid ambiguity, specify the action parameter last on the command line.
-
Uexpanded vs. expanded refers to whether the environment variable references (i.e., names between
%characters) are expanded after retrieving the Path value from the registry. For example,%SystemRoot%is unexpanded butC:\Windowsis expanded. -
The --add (-a) parameter checks whether the specified directory exists in both the unexpanded and expanded copies of the Path before adding the directory. For example, if the environment variable
TESTAPPis set toC:\TestAppand%TESTAPP%is in the Path, specifying--add C:\TestAppwill return exit code 183 (i.e., the directory already exists in the Path) because%TESTAPP%expands toC:\TestApp. -
The --remove (-r) parameter does not expand environment variable references. For example, if the environment variable
TESTAPPis set toC:\TestAppand%TESTAPP%is in the Path, specifying--remove "C:\TestApp"will return exit code 3 (i.e., the directory does not exist in the Path) because --remove does not expand%TESTAPP%toC:\TestApp. For the command to succeed, you would have to specify--remove "%TESTAPP%"instead. -
The program will exit with error code 87 if a parameter (or an argument to a parameter) is missing or not valid, if mutually exclusive parameters are specified, etc.
-
The program will exit with error code 5 if the current user does not have permission to update the Path value in the registry (for example, if you try to update the system Path using a standard user account or an unelevated administrator account).
Examples
-
EditPath --expand --system --listThis command outputs the directories in the system Path, with environment variables expanded. You can also write this command as
EditPath -x -s -l. -
EditPath --user --add "%LOCALAPPDATA%\Programs\MyApp"Adds the specified directory name to the user Path.
-
EditPath -s -r "C:\Program Files\MyApp\bin"Removes the specified directory from the system Path.
-
EditPath -s --test "C:\Program Files (x86)\MyApp\bin"Returns an exit code of 3 if the specified directory is not in the system Path, 1 if the specified directory is in the unexpanded copy of the system Path, or 2 if the specified directory is in the expanded copy of the system Path.