Write-Host "[-] Setting file associations..." -ForegroundColor Green # Zip $7zip = "${Env:ProgramFiles}\7-Zip\7z.exe" if (Test-Path $7zip) { $7zipfiletype = "7z.exe" cmd /c assoc .zip=$7zipfiletype | Out-Null cmd /c assoc .7z=$7zipfiletype | Out-Null cmd /c assoc .tar=$7zipfiletype | Out-Null cmd /c assoc .bz=$7zipfiletype | Out-Null cmd /c assoc .gz=$7zipfiletype | Out-Null cmd /c assoc .gzip=$7zipfiletype | Out-Null cmd /c assoc .bzip=$7zipfiletype | Out-Null cmd /c @" ftype $7zipfiletype="$7zip" "%1" "%*" > NUL "@ New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null Set-ItemProperty -Path "HKCR:\$7zipfiletype" -Name "(DEFAULT)" -Value "$7zipfiletype file" -Force | Out-Null Write-Host "`t[+] 7zip -> .zip" -ForegroundColor Green }