in reply to Re: Registering DLLs, lots of them
in thread Registering DLLs, lots of them

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

Replies are listed 'Best First'.
Re^3: Registering DLLs, lots of them
by BrowserUk (Patriarch) on Jan 13, 2005 at 07:01 UTC

    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 }

        Personally, I'd never use File::Find where glob does the job. The need for the sophistication and overhead of F::F is less on win32 where you don't have links and most other forms of pseudofiles to deal with.

        I like the fact that glob does a large amount of the work of pre-filtering of names before it gives me anything.

        I also infinitely prefer it's iterator form over any callback style function.

        And finally, I like that I can give it either a relative or absolute path plus wildcard and it will give me back the same type of paths, which most times is exactly what I want. Even when traversing subdirectory trees, I prefer to decide which directories to decend into, and in which order, at the point of use rather than stacking up large arrays. It uses less memory, and means I can abort or restart a search part way through if needed--something that is near impossible with the callback style of interface.

        In fact, I can honestly say that I have no code, beyond my initial, aborted experiments, that uses File::Find, or any of the other callbacks+globals, style of doing things. YMMV :)


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