Subject: | Can't open a MSI file from a mapped network drive |
Date: | Tue, 19 Mar 2013 08:59:13 +0000 |
To: | "bug-Win32-MSI-HighLevel [...] rt.cpan.org" <bug-Win32-MSI-HighLevel [...] rt.cpan.org> |
From: | "Schichmanter, Eitan" <eitan.schichmanter [...] hp.com> |
Hello,
I was developing some information gathering script in Perl for a Windows build and started using Win32::MSI::HighLevel.
My artifacts folder was on a mapped network drive (\\server\folder<file:///\\server\folder> ==> P:) so I was trying to use the following code:
$fN = 'P:\path_to_file\file.msi';
my $msi = Win32::MSI::HighLevel->new(-file => $fN);
When running I received the following run-time error:
Win32::API::Call: parameter 1 had a buffer overflow at C:/Perl64/site/lib/Win32/MSI/HighLevel.pm line 376.
Here's the excerpt from HighLevel.pm ($Win32::MSI::HighLevel::VERSION = '1.0008';) I have:
[cid:image002.png@01CE2490.C6F07120]
It took me some time to understand what happened, and only when I used Microsoft's ORCA to open the MSI, I saw that it doesn't support mapped network drives.
When I changed my code to open the file locally (copied it over for testing) it opened fine.
I suggest to add it as a caveat in the CPAN site (http://search.cpan.org/~grandpa/Win32-MSI-HighLevel-1.0008/lib/Win32/MSI/HighLevel.pm) to make sure other people don't waste time like me.
Thanks,
Eitan.