I would like to read an msi file. I use the library Win32 :: MSI :: HighLevel but this one sends me undef all the time.
My code:
use strict;
use warnings FATAL => 'all';
use Win32::MSI::DB qw(Win32::MSI::DB::MSIDBOPEN_READONLY);
use Win32::MSI::HighLevel;
use Data::Dumper;
my $msi = Win32::MSI::HighLevel->new (-file => "Firefox.msi", -mode => $Win32::MSI::DB::MSIDBOPEN_READONLY) or die "error $!";
my $productCode = $msi->getProductCode;
my $product = $msi->getProduct;
print Dumper $productCode;
The $product
returns ': - '
and $productCode
is undef .
I have checked the information of msi file in the Windows file properties and verified the information are inside. I have tried the code with another msi file and I have the same problem.