Skip to content

Instantly share code, notes, and snippets.

@s4parke
Last active June 12, 2023 17:40
Show Gist options
  • Save s4parke/20e3365bc79937d12b4d52b172adf867 to your computer and use it in GitHub Desktop.
Save s4parke/20e3365bc79937d12b4d52b172adf867 to your computer and use it in GitHub Desktop.
POV: You want to install Bridgecrewio/Yor for current Win10 User and update PATH the way your grandad did it.
# Get the latest version from https://github.com/bridgecrewio/yor/releases/
$Yor = @{
Uri = "https://github.com/bridgecrewio/yor/releases/download/0.1.180/yor_0.1.180_windows_amd64.zip"
OutFile = "$env:USERPROFILE\Downloads\yor.zip"
}
Invoke-WebRequest $Yor.Uri -OutFile $Yor.OutFile
# Extract Yor.exe to your Local AppData Folder using 7zip
$ProgramDir = "$env:USERPROFILE\AppData\Local\Programs\Yor"
7z e -y $Yor.OutFile -o"$ProgramDir"
# Copy the Program Path to clipboard
($ProgramDir) | Set-Clipboard
# Add it to your PATH environment variable in the UI and really persist it
systempropertiesadvanced
# Click Environment Variables
# Under "User", find "PATH" and click "Edit.." and "New"
# Paste the $ProgramDir from above and click "OK"
# Now close all your active PS Windows and run 'yor -v'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment