Reading MSI file using Java

I found how to read .msi files with .Net. Some of them use some libraries that come with Wix. Is there a way to read MSI data using Java. I would like to access tables and get text values.

+3
source share
3 answers

MSI files are structured COM storage. http://en.wikipedia.org/wiki/COM_Structured_Storage

There are several options. You can try to access it something like this: http://poi.apache.org/poifs/index.html

You can use JNI to access your own MSI APIs.

, - vbscript. script , stdout, java.

+1

. MSI - . MS Access.MDB Java JdbcOdbc, , .MSI .

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String msiFileName= "d:/java/test.msi";
String connectString = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
connectString += msiFileName.trim() + ";DriverID=22;READONLY=true}";
Connection con = DriverManager.getConnection( connectString ,"",""); 

, .:)

+1

API Windows Java?

API - MSI. .NET WiX, , .

MSI , / .

+1

Source: https://habr.com/ru/post/1730892/


All Articles