问题
I have an existing MSI package which I want to repackage to add installation options (so far the MSI has been installed through the command line with msiexec parameters in a .bat file).
Are there, as of today, freeware tools available to repackage the MSI? I was stumbling over WiX but as per my understanding I need VisualStudio to complete what I wanted (I dont have VisualStudio)?
Thank you!
回答1:
What exactly do you want to add to the MSI package?
You could use Orca to modify any table in the MSI.
回答2:
It sounds like you want to create a 'response transform'. There's a free tool here: http://www.jontylovell.net/index.php?page=10
You would right-click on your MSI, click 'Create Transform', and select all the appropriate options during the install phase. It will then create an MST (saved in a location of your choice) with all your preselected options, of which you can then apply to the original MSI on the command line:
MSIEXEC /i [path to MSI] TRANSFORMS=[path to MST]
回答3:
It seems like what I wanted to achieve is not really a common thing to do, so I stick to passing the configuration through the command line. a separate file (transform) will not help in my case because the goal was, just to have one file - a fully configured MSI - thanks everyone for the help though!
回答4:
Transform: If all you want is to create a transform you can use Orca (much preferred), SuperOrca, InstEd, and possibly other tools described here:
Orca is Microsoft's own tool, it is installed with Visual Studio and the Windows SDK. Try searching for
Orca-x86_en-us.msi
- underProgram Files (x86)
and install the MSI if found.
- How can I compare the content of two (or more) MSI files? (free tools - mentioned above)
- Commercial tools will also do the job of course. Generate Mst response tool.
Orca, Procedure: 1)
Open your MSI
, 2)
Transform => New Transform
, 3)
Make changes to MSI as appropriate
, 4)
Transform => Generate Transform
.
Similar approach in other tools.
Customizing MSIs: Here is an old answer on how to customize MSI installers (command lines / PUBLIC PROPERTIES, transforms, etc...): How to make better use of MSI files. Many further links from within that answer. It is an odd writeup that just happened, but the top section might help.
Sample transform application: To apply the transform during installation:
msiexec.exe /i myinstaller.msi TRANSFORMS="mytransform.mst;1031.mst" /L*V "msilog.log" /QN
Quick explanation:
/i = run install sequence
TRANSFORMS="mytransform.mst;1031.mst" = transform(s) to apply
/L*V "msilog.log"= verbose logging at specified path
/QN = run completely silently
Links:
- Orca, Transform: https://www.youtube.com/results?search_query=orca+create+transform
- Can the resulting command line be determined after running an .msi installer?
- Change Program Name and Shortcut Title during installation
- Bob Kelly: https://www.youtube.com/watch?v=LyESP0i8Mak
来源:https://stackoverflow.com/questions/54869537/msi-repackaging-free-tool