

This script simply loops through some predefined paths and values and sets them in the Windows Registry. Set-ItemProperty -Path $path -Name $name -Value $value -Type $type $_ = New-Item -Force -ItemType Directory -Path $path Value = $extractHere + $extractToFolder + $addToArchiveZip > 7-Zip > Icons in context menu"ĭisplayName = "Tools > Options. Value = "HKCU:\Software\7-Zip\Options"ĭisplayName = "Tools > Options. > Settings > Full row select"ĭisplayName = "Tools > Options. > Settings > Show `".`" item"ĭisplayName = "Tools > Options. # Define the flag values for the context menu itemsĭisplayName = "View > Toolbars > Large Buttons"ĭisplayName = "Tools > Options.

With this we can find the mapping between 7-Zip settings and Windows Registry values, and use this information to automate the configuration using the Windows PowerShell script below. Add these filters to only see how 7-Zip saves settings to the Windows Registry: Since we have installed Sysinternals we can use Process Monitor to monitor 7-Zip's access to the Windows Registry while we change some of its settings. The script then adds the path to the installation directory to the PATH environment variable so that 7z.exe can be used in any Windows Command Processor or PowerShell session. The installer automatically adds 7-Zip to the start menu. The script downloads an installer from the official website, and runs it in silent mode using the /S command-line option. Remove-Item -Force -Path $installerFilePath Set-ItemProperty -Path $keyPath -Name "Path" -Value $value

$value = (Get-ItemProperty -Path $keyPath -Name "Path").Path.Trim(" ") + " %ProgramFiles%\7-Zip" $keyPath = "HKLM:\System\CurrentControlSet\Control\Session Manager\Environment" # Add path to the PATH environment variable & $installerFilePath /S /D="$programFilesDirectoryPath"

$_ = New-Item -Force -ItemType Directory -Path $programFilesDirectoryPath If (-not (Test-Path -Path $programFilesDirectoryPath)) $programFilesDirectoryPath = "$Env:ProgramFiles\7-Zip" # Ensure the program files directory exists Invoke-WebRequest -Uri $url -OutFile $installerFilePath $installerFilePath = "$downloadsPath\$installerFileName" $downloadsPath = "$Env:USERPROFILE\Downloads" (This script requires an elevated Windows PowerShell session.) # Download the installer file The Windows PowerShell script below downloads and installs 7-Zip on Windows 11 ARM. So let's not waste words, and just install it. When it comes to software to handle archives, I agree with Scott Hanselman when he says that it's over and 7-Zip won.
