3

I'm trying to get the Windows version (10 or 11 in this case) of one of its windows update file by reading the metadata in Python. I've tried numerous ways, but they all seemed to fail.

Is there any way to get the intended Windows Version from its file (.msu .msi .cab .msp) without relying on the file name?

I'm getting these files from Windows Update Catalog, search "windows 10" or "windows 11".

1
  • 1
    I don't use Windows for years but as I remember .cab was some kind of compression file and you could extract content using extract.exe - and maybe one of file inside .cab can have information about system. Cabinet (file format) - Wikipedia Commented Jun 30 at 19:38

1 Answer 1

2
+100

From the filesystem metadata? No.

CAB (cabinet) files are archives, much like a ZIP file, that hold compressed copies of multiple files. The information you seek would not be part of the CAB metadata, but would be in a file (or files) within the CAB itself. Also, a single CAB could contain some files to be used for a Windows 10 update and another set of files for a Windows 11 update. So there may not even be an answer that applies to the CAB as a whole.

MSI (Microsoft installer) files are essentially databases describing what needs to be done to install a product (or update). If you knew how to access the right table in the database, you could, in many cases, figure out what the prerequisites are. But it's not that simple in the general case, as MSIs may include (or reference) custom scripts or even DLLs that do ad-hoc checking of prerequisites (among other things).

I'm not familiar with the other two file formats (MSU and MSP), but I doubt your likely to find the information you seek in their filesystem metadata.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.