Unzipping a large file silently - Can't figure out a solution

I have a SolidWorks installation that I’m trying to push via PSADT… I have the files zipped because they are huge (5gb zipped ~ 10 gb unzipped)…

When I try to use the built in function:

Expand-Archive -Path “$dirFiles\SOLIDWORKS 2022 SP3.1.zip” -DestinationPath “C:\SolidWorksSetup” -Force -Verbose *>&1 | Out-String | write-log

The files seem to expand correctly but the install fails every time… If I manually unzip the archive with 7Zip and then run the install, it works…

So, I tried using 7Zip to expand it…

`Execute-Process -FilePath “C:\Program Files\7-Zip\7z.exe” -Parameters “x “”$dirFiles\SOLIDWORKS 2022 SP3.1.zip”" -OC:\SolidWorksSetup"

it appeared to be unzipping as the process was running and PSADT was waiting for it to unzip but I waited over 2 hours and constantly monitored the disk space to see if it was extracting and it appeared to be hung or something…

So I tried piping it to a log:

Execute-Process -FilePath "C:\Program Files\7-Zip\7z.exe" -Parameters "x ""$dirFiles\SOLIDWORKS 2022 SP3.1.zip"" -OC:\SolidWorksSetup -bb > C:\Windows\Logs\Software\SolidWorks7ZipLog.log"

Which works when I run it via CMD but when I run it via PSADT it doesn’t wait and flies right past the extract and goes to try and run the install but of course fails because the files aren’t there…

So then I created an EXE of the files with 7Zip and run this:

Execute-Process -FilePath "$dirFiles\SOLIDWORKS 2022 SP3.1.exe" -Parameters "-oc:\SolidWorksSetup -y"

This actually works, and the install succeeds after the extract… However, it shows the 7Zip extract window to the user even though I have the deploy type as silent…

Anyone have any ideas how I can’t do this? It shouldn’t be this hard I wouldn’t think…Thanks

According to this: 7-Zip Command Line Examples — All Syntaxes Shared Here

try adding -bd to Disable the progress indicator.

Not an answer to the zipping question, but may still be helpful…

My Solidworks deployment package is ~23gb and while slow, it does work.

For various reasons, I have written a PoSh script that allows me to quickly push a CfgMgr/PSADT package to PCs. Just this week, I needed to use this script for SW, but the huge size was a problem. It was taking over an hour (two?) just to get the files down to the PCs. Then, the dir size on the client didn’t match the dir size on the server.

I found that using robocopy was a faster, more reliable way of pushing out this monster. I’m talking 30min vs hours. Not entirely sure why the difference, but I saw the improvement on several PCs.
Haven’t had the time to investigate. I’m using RC only for this ad hoc install script and haven’t modified my CfgMgr/PSADT package to also use RC, but I’m considering it…

My script uses this commandline:
Start-Process -FilePath robocopy.exe -ArgumentList "$ParentPath $Dest /mir /MT:16" -Wait

/MT:16 doubles the number of threads from the default.

Just keep in mind Robocopy’s odd exit codes if you’re capturing it, Robocopy Exit Codes - Windows CMD - SS64.com

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.