http://www.perlmonks.org?node_id=117432


in reply to location of application installed and executable

Here is a more complete example that gets the install root for you as well:

use Win32API::Registry 0.21 qw( :ALL ); my @software = qw ( Excel Word Outlook PowerPoint Perl ); for my $software (@software) { my ( $key, $type, $data ); print RegOpenKeyEx( HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Offi +ce\\9.0\\$software\\InstallRoot", 0, KEY_READ, $key ) ? "$software has registry key\n" : "$software seems to be missing ". +regLastError()."\n"; print RegQueryValueEx( $key, "Path", [], $type, $data, [] ) ? "Install Root: $data\n" : "$software ".regLastError()."\n"; } __END__ Excel has registry key Install Root: C:\Program Files\Microsoft Office\Office\ Word has registry key Install Root: C:\Program Files\Microsoft Office\Office\ Outlook has registry key Install Root: C:\Program Files\Microsoft Office\Office\ PowerPoint has registry key Install Root: C:\Program Files\Microsoft Office\Office\ Perl seems to be missing The system cannot find the file specified Perl The configuration registry key is invalid

Note that 9.0 represents Office 2000

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print