SolidWorks install fails only when using PSADT. Can't figure out why

I have a SolidWorks 2020 SP5 install that I’m trying to get working in SCCM… I have the install files zipped up and it’s around 7GB…

If I run startswinstall.exe /install /now /showui from an elevated command prompt in a folder with the files unzipped, the install works fine…

When I run it via SCCM it fails during a certain part of the SolidWorks install (the 3dmarketplace)…

Here is what I have in the PSADT Script:

Execute-Process -FilePath "$dirFiles\7za.exe" -Parameters "x $dirFiles\SOLIDWORKS2020SP50US.zip -OC:\SolidWorksSetup -y"
Execute-Process -FilePath "C:\SolidWorksSetup\SOLIDWORKS 2020 SP5.0 (US)\startswinstall.exe" -Arguments "/install /now /showui"

I thought maybe somehow files were getting corrupt during then unzip so I also tried using the

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

And it failed that way too…

Then a THIRD test… I took the working files and just put them on the machine and created an application in sccm so PSADT simply ran:

Execute-Process -FilePath "C:\SolidWorksSetup\SOLIDWORKS 2020 SP5.0 (US)\startswinstall.exe" -Arguments "/install /now /showui"

Any ideas why this is failing only via PSADT?
Thanks

For unzipping monster sized Zip files, I’d be using 7zip too!

Maybe your source path have a space. So you’d have to do something like:

Execute-Process -FilePath "$dirFiles\7za.exe" -Parameters "x `"$dirFiles\SOLIDWORKS2020SP50US.zip`" -OC:\SolidWorksSetup -y"

Notice the `" to escape the double quotes.

As for your Third test, I’d need to see the error it spits out in the PSADT log file.

The install starts and runs all the ways I run it… It just fails during the same spot, every time… No matter if I unzip the file with PSADT and then execute it, or simply execute the program when the files are already unzipped (my 3rd test)… See log below as you requested…
Thanks

|[Installation] :: Starting Install..|Deploy-Application|10/24/2022 8:16:40 AM|2036 (0x07F4)|
|---|---|---|---|
|[Installation] :: Bypassing Show-InstallationProgress [Mode: Silent]. Status message:Installing SolidWorks 2020 SP5.0.. This takes around 30-60 minutes..|Show-InstallationProgress|10/24/2022 8:16:40 AM|2036 (0x07F4)|
|[Installation] :: [C:\SolidWorksSetup\SOLIDWORKS 2020 SP5.0 (US)\startswinstall.exe] is a valid fully qualified path, continue.|Execute-Process|10/24/2022 8:16:40 AM|2036 (0x07F4)|
|[Installation] :: Working Directory is [C:\SolidWorksSetup\SOLIDWORKS 2020 SP5.0 (US)].|Execute-Process|10/24/2022 8:16:40 AM|2036 (0x07F4)|
|[Installation] :: Executing [C:\SolidWorksSetup\SOLIDWORKS 2020 SP5.0 (US)\startswinstall.exe /install /now /showui]...|Execute-Process|10/24/2022 8:16:40 AM|2036 (0x07F4)|
|[Installation] :: Execution completed successfully with exit code [0].|Execute-Process|10/24/2022 8:47:39 AM|2036 (0x07F4)|
|[Post-Installation] :: Update registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\FLEXlm License Manager] [SW_D_LICENSE_FILE = 25734@azuflex01].|Set-RegistryKey|10/24/2022 8:47:39 AM|2036 (0x07F4)|
|[Post-Installation] :: Update registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\WOW6432Node\FLEXlm License Manager] [SW_D_LICENSE_FILE = 25734@azuflex01].|Set-RegistryKey|10/24/2022 8:47:39 AM|2036 (0x07F4)|
|[Post-Installation] :: Bypassing Show-InstallationPrompt [Mode: Silent]. Message:You can customize text to appear at the end of an install or remove it completely for unattended installations.|Show-InstallationPrompt|10/24/2022 8:47:39 AM|2036 (0x07F4)|
|[Post-Installation] :: Bypassing Close-InstallationProgress [Mode: Silent]|Close-InstallationProgress|10/24/2022 8:47:39 AM|2036 (0x07F4)|
|[Post-Installation] :: Cati_SolidWorks_2020SP5.0_EN_01 Installation completed with exit code [0].|Exit-Script|10/24/2022 8:47:39 AM|2036 (0x07F4)|

From my point of view, the PSADT log file looks good.
startswinstall.exe exits with 0
IOW: not a PSADT issue.

I would look in startswinstall.exe’s log files.
Your screenshot has a in this directory link to where it creates its log files.
Click on that and start reading.

Your code snippet shows you’re using the -FilePath parameter but Execute-Process takes the -Path parameter instead.

I would agree, which is why I’m stumped… If I open a command prompt and run startswinstall.exe /install /now /showui it installs with no issues!!

How is that even possible? The same exact files in the same exact location install fine when running it via command prompt but fail at that same exact spot when running it via PSADT… Baffling…

So you have compared startswinstall.exe’s log files for a failure and a success and they match?!?!

It doesn’t error out like I showed in the screenshot above when I run it via cmd…

Another this that might be happening is startswinstall.exe spawns other EXEs to do parts of the installation.
Now because SCCM uses the SYSTEM account, it has 2 user profiles when it comes to %TEMP% folders: one for 32bit apps and one for 64bit apps.

$#it hits the fan when you have 32bit self-extracting EXE extracts to C:\WINDOWS\syswow64\config\systemprofile\AppData\Local\Temp then it launches a 64-bit EXE. The 64bit EXE will then look in to C:\WINDOWS\system32\config\systemprofile\AppData\Local\Temp but the files are in the other folder.

This would should up in your startswinstall.exe’s log file as missing files.

I would think too… But I can’t find anything… I also provided this log to support and they couldn’t figure it out…

Not that you want to parse through logs for me but here is the log for it:

I did something silly and read the log file.

First thing i noticed was you might be low on memory as per System Requirements | SOLIDWORKS
[I 17 1 workerthr..nager.cpp(16193) 15:23:58] {ID #55307} $S15:23:58 Info MachineInfo 17 55307 "Total System Memory (RAM): {0: 2.0 GB}"

Where is ACTUALLY fails is at the very end. It DLs files, but some files are missing. It ends with ErrorCode 2. If you lookup windows error numbers it says: ERROR_FILE_NOT_FOUND

[I     0 1    dsmarketplace.cpp( 241) 15:49:39] DSMarketplace Download URL: http://im.solidworks.com/2020/GetDownloadURL.aspx?serial_number=5T94TB7WIDD0DF234&subpath=nonsecure/3dexperience/marketplace/R2022x/FD04&filename=3DEXP_Mkt_SW_6.30.4012.exe&domain=dl-ak.solidworks.com&debug=0&release=20200-40500-1100-100&osa=8192:0:2&lid=1033&app=I&explungulation=2
[I     0 1    dsmarketplace.cpp( 248) 15:49:43] DSMarketplace Downloading Marketplace returned:0x00000000 https://dl-ak.solidworks.com/nonsecure/3dexperience/marketplace/R2022x/FD04/3DEXP_Mkt_SW_6.30.4012.exe to \3DEXP_Mkt_SW_6.30.4012.exe
[I     0 1  clientinstaller.cpp(6561) 15:49:43] {0: Installing} MSI: {1: \marketplace_latest\3dexperience marketplace.msi}; command-line: {2: INSTALLDIR="C:\Program Files\Common Files\SOLIDWORKS Shared\3DEXPERIENCE Marketplace\"     SLDIM=1 MSIFASTINSTALL=4 REBOOT=ReallySuppress TRANSFORMS="C:\SolidWorksSetup\SOLIDWORKS 2020 SP5.0 (US)\64bit\3DEXPERIENCE Marketplace\1033.mst"}
(ID {3: Marketplace}, lang {4: }, pcode {5: {0060450C-5B44-424B-BD42-559F2A5D820A}}, mode {6: 7}, upg = {7: }, f{8: 0}, costKB {9: 1405})
[I    90 1  clientinstaller.cpp(6562) 15:49:43] $S15:49:43	Info	Step	90	0	"{0: Installing} MSI: {1: \marketplace_latest\3dexperience marketplace.msi}; command-line: {2: INSTALLDIR="C:\Program Files\Common Files\SOLIDWORKS Shared\3DEXPERIENCE Marketplace\"     SLDIM=1 MSIFASTINSTALL=4 REBOOT=ReallySuppress TRANSFORMS="C:\SolidWorksSetup\SOLIDWORKS 2020 SP5.0 (US)\64bit\3DEXPERIENCE Marketplace\1033.mst"}
(ID {3: Marketplace}, lang {4: }, pcode {5: {0060450C-5B44-424B-BD42-559F2A5D820A}}, mode {6: 7}, upg = {7: }, f{8: 0}, costKB {9: 1405})"

[I     0 1  clientinstaller.cpp(6882) 15:49:43] Calling ::MsiInstallProduct: no installed product; step = 7
[I     0 3        utilities.cpp(6372) 15:49:43] Info: Attempting to grab MSI Server execution mutex
[I     0 1        utilities.cpp(6388) 15:49:43] Success: Grabbed the MSI Server execution mutex
[I     0 3  clientinstaller.cpp(6891) 15:49:46] INFO: Releasing the MSI Server mutex.
[I     0 3  clientinstaller.cpp(6911) 15:49:46] ::MsiInstallProduct returned 2
[E   156 1     msiinstaller.cpp(3329) 15:49:46] $S15:49:46	Error	Status	156	0	"***START DUMP OF WINDOWS INSTALLER DATA***"

[E   158 1     msiinstaller.cpp(3342) 15:49:46] $S15:49:46	Error	Status	158	0	"***END DUMP OF WINDOWS INSTALLER DATA***"

[E     0 1     msiinstaller.cpp(3287) 15:49:46] ** Install FAILED with code 2
[E   154 1     msiinstaller.cpp(3288) 15:49:46] $S15:49:46	Error	Step	154	0	"** Install FAILED with code 2"

[E     0 1     msiinstaller.cpp(3139) 15:49:46] Product:3DEXPERIENCE Marketplace ErrorCode:2

.

What to do?
I think its the Dual %temp% folder thing of the SYSTEM account that might be causing you issues.

But first, divide and conquer. Exclude the possibility that it’s PSADT’s fault:
-extract the files to C:\SolidWorksSetup
-Launch the installation DIRECTLY from SCCM.

If it fails, it’s a SYSTEM account issue introduced by SCCM
If it does installs, then it’s PSADT’s fault.

Hi there, seen this happen with Solidworks before when we ceated the install script. There is nothing wrong with your script. But you need to exclude the “3dmarketplace” from your Solidworks installation. If installed under the System account with CM. The 3dmarketplace is downloaded from the web (Latest version) and the System account is not allowed to do so. At least that is what we experienced. If you really need the 3D Marketplace execute the install under an admin account and fetch it from the download folder. Somewhere in the root of C: I thought (it’s been a while ago). Then add that separate to your script to install.

1 Like