There are a pile of modules in CPAN for GUID generation (Win32::Guidgen, Win32API::GUID, Data::UUID, ...), although for product codes it's often useful to generate a GUID given the product name (and possibly version number). In Win32::MSI::HighLevel I do that using:
use Digest::MD5 qw(md5_hex); sub genGUID { my $seed = shift; my $md5 = uc md5_hex ($seed); my @octets = $md5 =~ /(.{2})/g; substr $octets[6], 0, 1, '4'; # GUID Version 4 substr $octets[8], 0, 1, '8'; # draft-leach-uuids-guids-01.txt GUI +D variant my $GUID = "{@octets[0..3]-@octets[4..5]-@octets[6..7]-@octets[8.. +9]-@octets[10..15]}"; $GUID =~ s/ //g; return $GUID; }
In reply to Re^2: Perl script to change product code and product version in installshiled project (.ism) file?
by GrandFather
in thread Perl script to change product code and product version in installshiled project (.ism) file?
by premal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |