in reply to Registering DLLs, lots of them

In the short term, this may get you started. In the long term, buy a good book :)

#! perl -slw use strict; open 'LOG', '>', 'rereg.log' or die $!; while( glob '*.dll' ) { print LOG "unregister $_:", `regsvr32 -U $_`; print LOG "Register $_ :", `regsvr32 $_`; } close LOG;

Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.

Replies are listed 'Best First'.
Re^2: Registering DLLs, lots of them
by sasikumar (Monk) on Jan 13, 2005 at 06:45 UTC
    BrowserUK has given you a good solution. To add on use system instead of back ticks ``. Get the system commands out put and determine whether it was success or not.

    eg:$result=system("regsvr32 -U $_");
    Now determine the $result value and find out the result.

    Thanks
    SasiKumar

      I concur.

      I just discovered that regsvr32 doesn't provide any useful output--chosing to display errors in a popup instead.

      So the OP should also include /s to disable that.


      Examine what is said, not who speaks.
      Silence betokens consent.
      Love the truth but pardon error.
        The OP can also use File::Find to recurse through sub directories.
        #! /usr/bin/perl -w use strict; use warnings; use File::Find; my @directories = @ARGV ? @ARGV : ('.'); find(\&wanted, @directories); sub wanted { return unless /\.dll$/i; # Do something with $File::Find::name }