Thread 2 Fragen (Perl2exe,Software abfrage) (6 answers)
Opened by aspnstyle at 2008-03-21 19:08

renee
 2008-03-22 13:54
#107359 #107359
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Mit CPAN:Win32::TieRegistry und Adminrechten geht folgendes:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl

use strict;
use warnings;
use Win32::TieRegistry;

use constant KEY => 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall';

my $registry = $Registry->{'LMachine\\'};

for my $key ( split /\\/, KEY ){
    $registry = $registry->{ $key . '\\' };
}

for my $key ( keys %$registry ){
    next unless index( $key, '{' ) == 0;
    my $tmp = $registry->{$key};

    next unless $tmp->{DisplayName};
        
    print sprintf "Programm:\t%s\nVersion:\t%s\nDatum:\t%s\nHersteller:\t%s\n", @{ $tmp }{ qw/DisplayName DisplayVersion InstallDate Publisher/ };
}
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread 2 Fragen (Perl2exe,Software abfrage)