File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,6 +116,21 @@ if ($sevenZip) {
116116 exit 1
117117}
118118
119+ # Handle nested archives (the outer 7z may contain chrome.7z or other archives)
120+ $nested7zFiles = Get-ChildItem - Path $InstallDir - Filter " *.7z" - Recurse - ErrorAction SilentlyContinue
121+ foreach ($nested in $nested7zFiles ) {
122+ Write-Host " Extracting nested archive: $ ( $nested.Name ) "
123+ & $sevenZip.Source x $nested.FullName - o" $InstallDir " - y | Out-Null
124+ Remove-Item $nested.FullName - Force
125+ }
126+
127+ $nestedZipFiles = Get-ChildItem - Path $InstallDir - Filter " *.zip" - Recurse - ErrorAction SilentlyContinue
128+ foreach ($nested in $nestedZipFiles ) {
129+ Write-Host " Extracting nested archive: $ ( $nested.Name ) "
130+ Expand-Archive - Path $nested.FullName - DestinationPath $InstallDir - Force
131+ Remove-Item $nested.FullName - Force
132+ }
133+
119134Write-Host " 4. Cleaning up..."
120135Remove-Item $tempFile - Force
121136
You can’t perform that action at this time.
0 commit comments