From 24b4f1d51c36fe01110d619aa9eba4deafd64810 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Sat, 28 Dec 2024 10:04:20 -0500 Subject: [PATCH] set the executable search path --- CHANGELOG.md | 3 ++- docs/guides/install/windows.mdx | 18 +++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0320d0dd..78a17f7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ FIX: Docker share examples had incorrect default path for zrok environment mountpoint +CHANGE: Set the Windows executable search path in the Windows install guide. + ## v0.4.45 FEATURE: Minimal support for "organizations". Site admin API endpoints provided to create, list, and delete "organizations". Site admin API endpoints provided to add, list, and remove "organization members" (zrok accounts) with the ability to mark accounts as a "organization admin". API endpoints provided for organization admins to list the members of their organizations, and to also see the overview (environments, shares, and accesses) for any account in their organization. API endpoint for end users to see which organizations their account is a member of (https://github.com/openziti/zrok/issues/537) @@ -20,7 +22,6 @@ FIX: Docker reserved private share startup error (https://github.com/openziti/zr FIX: Correct the download URL for the armv7 Linux release (https://github.com/openziti/zrok/issues/782) - ## v0.4.44 FIX: Fix for goreleaser build action to align with changed ARM64 build path. diff --git a/docs/guides/install/windows.mdx b/docs/guides/install/windows.mdx index 50e505ad..e6bb4b76 100644 --- a/docs/guides/install/windows.mdx +++ b/docs/guides/install/windows.mdx @@ -18,14 +18,19 @@ import styles from '@site/src/css/download-card.module.css'; -1. Extract `zrok.exe` to `%USERPROFILE%\bin` and set search `%PATH%`. +1. In PowerShell, install in `%USERPROFILE%\bin\zrok.exe` and set the search path. ```text $binDir = Join-Path -Path $env:USERPROFILE -ChildPath "bin" New-Item -Path $binDir -ItemType Directory -ErrorAction SilentlyContinue $latest = Get-ChildItem -Path .\zrok*windows*.tar.gz | Sort-Object LastWriteTime | Select-Object -Last 1 tar -xf $latest.FullName -C $binDir zrok.exe - $env:path += ";"+$binDir + $currentPath = [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::User) + if ($currentPath -notlike "*$binDir*") { + $newPath = "$currentPath;$binDir" + [System.Environment]::SetEnvironmentVariable('PATH', $newPath, [System.EnvironmentVariableTarget]::User) + $env:Path = $newPath + } ``` 1. With the `zrok` executable in your path, you can then execute the `zrok` directly. @@ -44,15 +49,6 @@ import styles from '@site/src/css/download-card.module.css'; v0.4.0 [c889005] ``` -## Enable Your Environment - -Enable your environment without saving the account token in shell history, i.e., `zrok enable {token}`. - -```text -$zrokAccountToken=Read-Host "Enter your zrok account token" -AsSecureString; -zrok enable ([System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($zrokAccountToken))) -``` - ## Wintun for zrok VPN On Windows, you must install Wintun to use zrok's VPN backend mode. See the [VPN guide](/guides/vpn/vpn.md) for more details.