6 ms·
Show HN: Inspect and extract files from MSI installers directly in your browser
Hey everyone!
I'm excited to share a small web app I built that allows you to view and extract the contents of Windows MSI installers directly in your browser. It's essentially a web-based "lessmsi" powered by Pyodide.
You can try it out at: https://pymsi.readthedocs.io/en/latest/msi_viewer.html https://pymsi.readthedocs.io/en/latest/msi_viewer.html
My motivation for building this was from part of my day job -- I often get Windows MSI installers and need to extract files while preserving the relative directory structure and filenames, as they would appear after a full installation. The existing tools I found were good but limited in which platforms they support: lessmsi works great on Windows, while msitools works for Linux/macOS. Neither is a truly cross-platform solution that works on any major OS.
So we developed pymsi (a pure Python library, available on GitHub at https://github.com/nightlark/pymsi https://github.com/nightlark/pymsi) to handle reading and extracting MSI files from Python. Then I realized that since pymsi has no native dependencies, it could potentially run in a web browser using Pyodide. After a bit of "vibe coding" and fixing some "hallucinated" functions/classes that don't exist in pymsi, the result was this client-side web app.
If you need an MSI file to experiment with, older versions of PowerToys included the installer in .msi form, such as this one: https://github.com/microsoft/PowerToys/releases/download/v0.21.1/PowerToysSetup-0.21.1-x64.msi https://github.com/microsoft/PowerToys/releases/download/v0....
Note that the underlying pymsi library hasn't been extensively tested against a bunch of MSI installers yet, so there might still be lingering bugs. If you come across any issues, please don't hesitate to report them in on the GitHub repository (https://github.com/nightlark/pymsi/issues https://github.com/nightlark/pymsi/issues).
I'd love to hear your feedback and answer any questions!
- jamesholden 1y agoFeedback: A way to export data would be nice.
- rmast 1y agoWhat type of data export would you find most useful? * Tables as a collection of CSV files, or an Excel workbook * Contents of streams * StringPool data dump * Option to configure file dump to export using either SourceDir paths, or target destination dir paths
- rmast 1y agoAs a side note, I just tried it in mobile Safari on my iPhone -- at least inspecting MSI files works, extracting files may work as well (not sure where it is placing the "downloaded" zip file).
- jasonjmcghee 1y agoMy safari puts things in icloud drive / downloads
- lxgr 1y agoThat's configurable in the Safari settings, fwiw (I personally prefer my downloads to not automatically become uploads, especially on mobile data).
- pragma_x 1y agoI feel like this would also solve the "I just need the printer driver file(s), not everything else" use-case. Nice work.
- blangk 1y agoPrinter drivers rarely if ever come in MSI format. They most commonly use self extracting exe archive.
- nebula8804 1y agoYeah, start the installer, quickly look at the temp directory for the files, nab em then quit the installer. This and many other janky techniques are what I use to survive in the jungles of the Windows platform. I would also like to promote one of my most favorite tools ever: InstallWatch Pro by Epsilon Squared It takes a complete HDD and Registry snapshot, you install something then it takes another snapshot and shows you the diff in a easy to read format.
- lloydatkinson 1y agoWhat’s its homepage? I only see the usual fake software sites on google
- nebula8804 1y agoSorry it seems like their site is not accessible: I think its www.epsilonsquared.com
- wiseleo 1y agoThank you for InstallWatch Pro mention. That app tends to get reinvented every so often. I remember seeing something like it as early as 1996.
- nebula8804 1y agoYeah Im sure even ChatGPT can spit out a script that can do this work. It just seems like this particular software by this company is really simple and super solid. I wish there was an equivalent for MacOS & Linux as the scripts I have tried to make(or had ChatGPT try to make) just don't cut the mustard. I'd rather just have some commercial software do this even if I have to pay for a license.
- Lanrei 1y agoNeat. I usually just use 7zip to open .exe and .msi files.
- hypercube33 1y agoI don't think 7zip really can see into a lot of janky MSI files to get the actual installed content, can it?...it can technically break open NSIS files and get the source but that is disabled in code after 15.05 (GitHub has a mod to renable source extraction fyi) and yes self extracting exe files.
- rmast 1y agoMy experience with 7zip has been that it can read the tables and cab files from MSI files, but when you go to extract the contents you just get the raw files without the directory restructure associated with the MSI file (and the names of the extracted files can also have issues).
- atmanactive 1y agoLet's not forget Universal Extractor: https://github.com/Bioruebe/UniExtract2 https://github.com/Bioruebe/UniExtract2
- WarOnPrivacy 1y agoI had forgotten. For years and years it was part of my install everywhere kit. This is a good reacquaintance.
- danielodievich 1y agoI was there at Microsoft in the beginning of MSI, which was what, Office XP? Gosh or was it 2003? The tooling for dealing with them was super jank then. I could have never predicted that you'd be able to just casually open it in a browser. Nice job man!
- EvanAnderson 1y agoI remember dealing with installing the Windows Installer redistributable on Windows 98. The Wikipedia[0] article cites Office 2000 shipped w/ Windows Installer 1.0. [0] https://en.wikipedia.org/wiki/Windows_Installer https://en.wikipedia.org/wiki/Windows_Installer
- simonw 1y agoThis is really cool! Suggestion: find a small MSI file that you can host as part of the demo and add a "load example file" button - that way people can try it out even if they don't have an MSI file to hand already.
- hypercube33 1y agoI don't know the license around it but hosting orca.msi would be a silly thing to do
- rmast 1y agoIt looks like orca.msi uses external cab files, so maybe a bit harder to do than just fetching a single file MSI into the Pyodide file system. If the license allows, it would be interesting to have as an option for the example.
- rmast 1y agoThanks for the suggestion! I just added a button to load a small example MSI file.
- pragmatick 1y agoMinor thing: When I load the page and click "Load example file" while Pyodide is still loading I see a stacktrace for a short time. Perhaps disable the button until it's loaded?