I am following these steps to extract a file from MSI and edit it and keeping it back. But when I install the new MSI, its not able to find the files inside the cabinet (.cab).
Extract the cab file from MSI
msidb -d "Setup.msi" -x Client.cab
Extract the file from cab file.
cabarc X Client.cab *.* C:\ClientExtract\
Edit the extracted file inside folder C:\ClientExtract
Create a new cab file from modified files
cabarc N Client.cab C:\ClientExtract\*.*
Remove the existing cab from Setup.msi
msidb -d "Setup.msi" -k Client.cab
Add the newly created cab file to msi
msidb -d "Setup.msi" -a Client.cab
Now, this MSI file is not getting installed and its saying some file is not found. When I am running steps1, 5 and 6 only, the MSI works smoothly. I believe the issue will be with cabarc.exe which is not able to maintain the folder structure.
Any help or alternative solution will be appreciated. msi2xml and xml2msi works but I cant use that.