Subject: | Long length at E:/Strawberry/perl/vendor/lib/Win32/Exe/Resource/Version.pm line 113. |
Dear,
I have a problem to update information in executable file created by PAR::Packer.
I am using Strawberry PERL 5.20 on Windows 8.1 64-bits and PAR::Packer version 1.019.
Creation of executable file :
pp -o hello.exe -e "print 'hello, world';"
Test :
Show quoted text
>hello.exe
hello, world
Exe works.
Now, i have wrote two scripts to see and change informations
read-exe-info.pl
#!/usr/bin/perl
use strict;
use warnings;
use Win32::Exe;
my $exe = Win32::Exe->new('C:/Users/djibel/Desktop/hello.exe');
# Get version information
my $info = $exe->get_version_info;
print qq($_ = $info->{$_}\n) for ( sort keys(%$info) );
print "============================\n\n";
update-exe-info.pl
#!/usr/bin/perl
use strict;
use warnings;
use Win32::Exe;
my $exe = Win32::Exe->new('C:/Users/djibel/Desktop/hello.exe');
# Get version information
$exe->update( info =>
[
'CompanyName=My company',
# 'FileDescription=My description', # <---------Problem
'FileVersion=1.2.3.4',
'InternalName=Internal name',
# 'LegalCopyright=Legal Copyright', # <---------Problem
'OriginalFilename=Original File',
'ProductVersion=5.6.7.8',
# 'Comments=My comments', # <---------Problem
# 'LegalTrademarks=Legal Trademarks', # <---------Problem
# 'ProductName=Product name', # <---------Problem
]
);
Now I can make some tests on commande line (DOS)
pp -o hello.exe -e "print 'hello, world';" && read-exe-info.pl && update-exe-info.pl && read-exe-info.pl
Results :
CompanyName =
FileDescription =
FileVersion = 0.0.0.0
InternalName =
LegalCopyright =
LegalTrademarks =
OriginalFilename =
ProductName =
ProductVersion = 0.0.0.0
============================
CompanyName = My company
FileDescription =
FileVersion = 1.2.3.4
InternalName = Internal name
LegalCopyright =
LegalTrademarks =
OriginalFilename = Original File
ProductName =
ProductVersion = 5.6.7.8
============================
BUT, if I uncomment one of theses keys :
- FileDescription
- LegalCopyright
- Comments
- LegalTrademarks
- ProductName
I have a problem : Long length at E:/Strawberry/perl/vendor/lib/Win32/Exe/Resource/Version.pm line 113.
The exe is corrupt and not work. Any ideas ?
Best Regards,
DJIBEL