I suggest: http://support.microsoft.com/kb/249873, the Microsoft page entitled: Explanation of Regsvr32 usage and error messages.

Update: I think that some experimentation will be required as to what the /s option (silent..no GUI) does and what is returned if the command doesn't work. Then test on XP, Vista, Win 7 in the "flavors" that you intend to support.

Yet another update!

I don't understand the necessity of this code:

if (! -f "$Value_DLL") { $ERR = 10; &printlog ("Value DLL not found($Value_DLL)...\n"); &printlog (" Execution Terminated!"); exit $ERR; }
I assume that this is an installation program. In that case, the copy did work and the file named $Value_DLL does exist at this point. So this file test will never fail. I would separate the dirpath from the DLL name. $dir_path/$Value_DLL rather than combining this into a single $Value_DLL name value. But this is just a detail.

Then we are going to essentially run the Windows command, regsvr32 /s "$dir_path/$Value_DLL" and want to know what the return value is of that. I would think that system() is the right way to go with that and check the return value: http://perlhowto.org/executing_external_commands. Some fiddling with "/" to "\" is required for the Windows path name as this is a command that will go to the Windows shell. But you should be able to get the value that would be returned to the shell and can make decisions based upon that, ie did the regsvr32 command work or not?

Some experimentation and testing is going to be required, but I think that this approach will work.


In reply to Re: how do i check DLL if registered correctly? by Marshall
in thread how do i check DLL if registered correctly? by nico7nibor

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.