edit: nevermind, it had typos and got me confused, i guess i should be asleep

use Win32::TieRegistry (Delimiter => '/'); my $version=2000; { my $mykey0 = $Registry->{"HKEY_LOCAL_MACHINE/SOFTWARE/ActiveState/Acti +vePerl/$version"}; print 'MK0:'.$mykey0."\n"; } { my $mykey2 = $Registry->{"HKEY_LOCAL_MACHINE/Software/ActiveState/Acti +vePerl/$version"}; print 'MK2:'.$mykey2."\n"; } { my $mykey = $Registry->{"HKEY_LOCAL_MACHINE/SOFTWARE/ActiveState/Activ +ePerl/$version/"}; print 'MK1:'.$mykey."\n"; my $mykeyval = $mykey->{'Help//'}; print 'MV1:'.$mykeyval."\n"; } { my $part='TroubleShooters'; my $mykey = $Registry->{"HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/DeviceM +anager/$part/"}; print 'ms1:'.$mykey."\n"; my $mykeyval = $mykey->{'/TroubleShooter-3'}; print 'ms2:'.$mykeyval."\n"; } __END__ my $version='2.1'; my $mykey = $Registry->{"HKEY_LOCAL_MACHINE/SOFTWARE/SPS/$version/"}; my $mykeyval = $mykey->{'/AppsDir'}; $mykeyval2="$mykeyval"."\\start.exe"; system("$mykeyval2");
This works just fine, no caps, no slash needed at end, does need double quotes.


this is original with typos

use Win32::TieRegistry (Delimiter => '/'); my $version=2000; { my $mykey0 = $Registry->{"HKEY_LOCAL_MACHINE/SOFTWARE/ActiveState/Acti +vePerl/$version"}; print 'MK0:'.$mykey."\n"; } { my $mykey2 = $Registry->{"HKEY_LOCAL_MACHINE/Software/ActiveState/Acti +vePerl/$version"}; print 'MK2:'.$mykey."\n"; } { my $mykey = $Registry->{"HKEY_LOCAL_MACHINE/SOFTWARE/ActiveState/Activ +ePerl/$version/"}; print 'MK1:'.$mykey."\n"; my $mykeyval = $mykey->{'Help//'}; print 'MV1:'.$mykeyval."\n"; } { my $part='TroubleShooters'; my $mykey = $Registry->{"HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/DeviceM +anager/$part/"}; print 'ms1:'.$mykey."\n"; my $mykeyval = $mykey->{'/TroubleShooter-3'}; print 'ms2:'.$mykeyval."\n"; } __END__ my $version='2.1'; my $mykey = $Registry->{"HKEY_LOCAL_MACHINE/SOFTWARE/SPS/$version/"}; my $mykeyval = $mykey->{'/AppsDir'}; $mykeyval2="$mykeyval"."\\start.exe"; system("$mykeyval2");
Result
MK0: MK2: MK1:Win32::TieRegistry=HASH(0xb6e354) MV1:C:\Perl\html\index.html ms1:Win32::TieRegistry=HASH(0xa3ec64) ms2:hcp://help/tshoot/Err_Hardw_Error3.htm
First you need the double quotes,
Second SOFTWARE is all caps,
Third "subkey-name" has to end in a slash (delimiter).

http://search.cpan.org/~adamk/Win32-TieRegistry-0.26/lib/Win32/TieRegistry.pm
"Hash key string ends with a delimiter
If the key string ends with a delimiter, then it is treated as a subkey name or path of subkey names separated by delimiters."

what i think should work for you is below the __END__, i cant test it 'cuz i dont have SPS


In reply to Re^3: Open an application from windows registry by huck
in thread Open an application from windows registry by ElAlx

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.