←back to thread

135 points rmast | 2 comments | | HN request time: 0.442s | source

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

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) 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....

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).

I'd love to hear your feedback and answer any questions!

Show context
pragma_x ◴[] No.44331940[source]
I feel like this would also solve the "I just need the printer driver file(s), not everything else" use-case. Nice work.
replies(1): >>44332223 #
blangk ◴[] No.44332223[source]
Printer drivers rarely if ever come in MSI format. They most commonly use self extracting exe archive.
replies(1): >>44332891 #
nebula8804 ◴[] No.44332891[source]
Yeah, 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.

replies(2): >>44333106 #>>44347078 #
1. wiseleo ◴[] No.44333106[source]
Thank you for InstallWatch Pro mention. That app tends to get reinvented every so often. I remember seeing something like it as early as 1996.
replies(1): >>44334787 #
2. nebula8804 ◴[] No.44334787[source]
Yeah 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.