Subject: | Win32::Exe::write corrupts a certain DLL |
All other exes and dlls seem to work fine. It can't read back what it
wrote. All other exes and dlls seem to work fine. I even tried
upgrading to 0.09. I use this script which is an attempt to tweak
things down to the lowest element. Unfortunately, I don't know enough
to drill deaper.
I'm using ActivePerl 5.8.7.813 on WinXP
#!/usr/local/bin/perl
use strict;
use Win32::Exe;
sub usage {
return "usage: stampVersion fileVersion productVersion <files...>
version - 4 numbers separated by periods. example: 4.5.0.23";
}
my $fileVersionStamp = shift || die usage();
my $productVersionStamp = shift || die usage();
while (my $file = shift) {
my $exe = Win32::Exe->new($file);
my $version = $exe->version_info() || die "Can't read resource
section of $file";
#$exe->set_version_info(\["FileVersion",$fileVersionStamp]);
#$exe->set_version_info(ProductVersion=>$productVersionStamp);
$fileVersionStamp =~ s/\./,/g;
$fileVersionStamp =~ s/, ?/, /g;
$productVersionStamp =~ s/\./,/g;
$productVersionStamp =~ s/, ?/, /g;
print "$file: $fileVersionStamp : $fileVersionStamp\n";
$version->set(FileVersion=>$fileVersionStamp);
$version->set("/StringFileInfo/#1/FileVersion"=>$fileVersionStamp);
$version->set(ProductVersion=>$productVersionStamp);
$version->set("/StringFileInfo/#1/ProductVersion"=>$productVersionStamp);
$version->refresh;
$exe->write;
}
Subject: | WBDEG44I.DLL |
Message body not shown because it is not plain text.