Eustaquio has asked for the wisdom of the Perl Monks concerning the following question:

Hi Folks,

I need some help whith a script running in Win95. It runs in WinNT succesfully. However, in Win95 it donīt run as expected.

Here is the code:

use strict; use Win32API::Registry 0.22 qw( :ALL ); # my $key; my $type; my $data; my $pData = "\"%1\" %*"; # RegOpenKeyEx( HKEY_CLASSES_ROOT, "exefile\\shell\\open\\command", 0, K +EY_READ | KEY_WRITE | KEY_NOTIFY, $key ); for(;;) { RegNotifyChangeKeyValue( $key, 1, REG_NOTIFY_CHANGE_LAST_SET,"", 0 ) +; RegSetValueEx( $key, "", 0, REG_SZ , $pData, 0 ); print "Value Changed....\n"; RegCloseKey( $key ); RegOpenKeyEx( HKEY_CLASSES_ROOT, "exefile\\shell\\open\\command", 0, + KEY_READ | KEY_WRITE | KEY_NOTIFY, $key ); }

At running, the RegNotifyChangeKeyValue method don't goes to "wait state".

Is there any restrictions when using under Win95?

Edit Mirod: added code tags

Any help will be appreciated, Eustaquio.

Replies are listed 'Best First'.
Re: Help with script in Win95
by Superlman (Pilgrim) on Aug 17, 2001 at 19:29 UTC
    Are you sure this wouldn't be better posted under "obfusication"? You need to format a bit nicer and maybe preview before you submit in the future.

    Update: The problem has been fixed... code tags added. Formatted nicely now. My apologies...

      ARGH! It seems to look fine now. I don't know if it was a browser problem on my end, or what, but it no longer looks ugly. My apologies. This is rather embarassing.
        i did the same thing a few weeks ago ... don't worry about it. read the writeup formatting tips in the site faq.