Page 1 of 1

Service Release extraction

PostPosted: Fri Apr 07, 2023 12:37 pm
by SBarnes
Is there a way to extract the files from a service release msp file?

Re: Service Release extraction

PostPosted: Tue Apr 11, 2023 10:41 am
by Mike.Sheen
SBarnes wrote:Is there a way to extract the files from a service release msp file?


MSP's don't actually contain files, just binary differences which are to be applied to existing files.

Re: Service Release extraction

PostPosted: Tue Apr 11, 2023 10:45 am
by SBarnes
So that means there is no way of getting the REST API plugin out of the IIS zip file without applying the MSP, correct?

Re: Service Release extraction

PostPosted: Tue Apr 11, 2023 10:48 am
by Mike.Sheen
SBarnes wrote:So that means there is no way of getting the REST API plugin out of the IIS zip file without applying the MSP, correct?


I'm not going to say there is no way, there might be but it's beyond my interest in finding out!

The known way is, as you say, install the msp and then you can get the patched REST API plugin from the JiwaAPI.zip IIS package file in the Jiwa installation folder. Or, if you're special enough, you can obtain it from our source repo.

Re: Service Release extraction  Topic is solved

PostPosted: Tue Apr 11, 2023 5:17 pm
by Scott.Pearce
Oddly enough, I had to do this today. Below is my process:


Extracting files from MSPs

When it comes to extracting files from MSPs, it works a bit differently than it would for MSIs. With an MSI file, all you need to do is use the 7zip file extractor, but MSP files depend on the base MSI installation packages.

Since MSP benefits from msiexec commands, we can use the administrative install parameter to say where to extract the content. However, we need to take into consideration the base MSI dependency. So, we need to perform three separate actions:

1. Extract the base MSI from Setup.exe.
Create folder "C:\FolderInWhichMSIWillBeExtracted". Open an administrative command prompt, CD to where Setup.exe is, and run the command:

Code: Select all
Setup.exe /extract "C:\FolderInWhichMSIWillBeExtracted\"


A bunch of files used to install Jiwa will now be in c:\FolderInWhichMSIWillBeExtracted including Setup.msi.


2. Extract the files from the base MSI.
CD to "C:\FolderInWhichMSIWillBeExtracted\" and then run the command:

Code: Select all
msiexec /a Setup.msi TARGETDIR="c:\FolderInWhichMSIWillBeExtracted\extracted" /qb


If prompted to reboot, choose no. The above command does not install Jiwa but will instead extract the contents of Setup.msi to a folder called c:\FolderInWhichMSIWillBeExtracted\extracted (the "extracted" sub-folder will be created if it doesn't already exist).


3. Patch the files extracted from the base MSI using the MSP
To do that, CD to where your msp file is, and then execute the following command line:

msiexec /p Jiwa7.2.1.0.SR15.msp /a "c:\FolderInWhichMSIWillBeExtracted\extracted\Setup.msi" /qb

If prompted to reboot, choose no. After you execute the last command, you can navigate to the c:\FolderInWhichMSIWillBeExtracted\extracted folder and get the patch files from there.


We currently use Advanced Installer to build our installation packages and I find their website full of good information. I pinched a few of the above steps from their blog post here. I also find their forums useful for installer-based questions.

Re: Service Release extraction

PostPosted: Tue Apr 11, 2023 7:01 pm
by SBarnes
Thanks Scott worked a treat :D

Re: Service Release extraction

PostPosted: Tue Apr 11, 2023 10:17 pm
by pricerc
Or export/copy the plugin from a machine with the MSP installed and load that into the target system?

Re: Service Release extraction

PostPosted: Wed Apr 12, 2023 10:54 am
by Mike.Sheen
pricerc wrote:Or export/copy the plugin from a machine with the MSP installed and load that into the target system?


That's the simple, obvious way - but it's not always convenient to install on a machine.

Re: Service Release extraction

PostPosted: Wed Apr 12, 2023 10:56 am
by SBarnes
And the whole point of the original question. :lol: