Page 1 of 1

Registering DLL is a mystery

Posted: Fri Jun 22, 2007 12:27 am
by get101
Can I get some basic help on how to register DLLs and OCXs please?

I've read other messages in the forum and I'm puzzled.

I went to Registry, and then clicked Import.

Now what do I do?

(This is what I did, but I guess its wrong because it didn't do anything: I selected one of the DLL files in my installation directory).

I am converting a Wise script into IA. I tried importing it to see if it would reveal what was needed. But that simply marked every file as Self registering, so it was no help at all.

I have no idea what to do next. Can you help by giving me a simple, really basic, step by step guide? I have about 15 dlls and ocxs.

Posted: Fri Jun 22, 2007 11:03 am
by Edhy
Hi,

Here how I do register mine, after the Apply Install command:

Code: Select all

    Apply Install (get result into variable SUCCESS)
     
    if Variable SUCCESS not Equals ERROR
      if Variable SUCCESS not Equals CANCEL
        Comment: Progytech: Register .OCX files
        Register Library $TARGETDIR$\\ctExplorer.ocx
        Register Library $TARGETDIR$\\Io.ocx
        Register Library $TARGETDIR$\\ctToolBar.ocx
        Register Library $TARGETDIR$\\VRep\\Distribution\\ctmonth.ocx
         
        Comment: Progytech: Register the .NET library cdrCryptoLib.dll
        Run Program $BootDrive$\\Progytech\\ezCallTrack\\cdrServer\\RegAsm.exe $BootDrive$\\Progytech\\ezCallTrack\\cdrServer\\CDRcryptolib.dll /silent /codebase  (WAIT)
         
        Install Fonts from '$TARGETDIR$\\Fonts\\*.ttf'
         
        Comment: If this installation includes the cdrServer, then Start the cdrService Monitor
        if Variable USE_CDR_SERVER Equals TRUE
          Run Program $BootDrive$\\Progytech\\ezCallTrack\\cdrServer\\cdrServiceMonitor.exe 
          Comment: MessageBox: $TITLE$, The cdrServer has been installed on this workstation.$NEWLINE$Start the service by righ click the "ezCallTrack Service Monitor" icon on the right side of your monitor and choose Start Service.
        end
      end
    end
  end

Posted: Mon Jun 25, 2007 1:43 am
by get101
Edhy wrote:Hi,

Here how I do register mine, after the Apply Install command:

Code: Select all

    Apply Install (get result into variable SUCCESS)
     
    if Variable SUCCESS not Equals ERROR
      if Variable SUCCESS not Equals CANCEL
        Comment: Progytech: Register .OCX files
        Register Library $TARGETDIR$\\ctExplorer.ocx
        Register Library $TARGETDIR$\\Io.ocx
        Register Library $TARGETDIR$\\ctToolBar.ocx
        Register Library $TARGETDIR$\\VRep\\Distribution\\ctmonth.ocx
         
        Comment: Progytech: Register the .NET library cdrCryptoLib.dll
        Run Program $BootDrive$\\Progytech\\ezCallTrack\\cdrServer\\RegAsm.exe $BootDrive$\\Progytech\\ezCallTrack\\cdrServer\\CDRcryptolib.dll /silent /codebase  (WAIT)
         
        Install Fonts from '$TARGETDIR$\\Fonts\\*.ttf'
         
        Comment: If this installation includes the cdrServer, then Start the cdrService Monitor
        if Variable USE_CDR_SERVER Equals TRUE
          Run Program $BootDrive$\\Progytech\\ezCallTrack\\cdrServer\\cdrServiceMonitor.exe 
          Comment: MessageBox: $TITLE$, The cdrServer has been installed on this workstation.$NEWLINE$Start the service by righ click the "ezCallTrack Service Monitor" icon on the right side of your monitor and choose Start Service.
        end
      end
    end
  end
Hi Edhy

Thanks for this.

Looking at the Help for Register Library, it says:

Files you self register with this command during an installation must be explicitly unregistered when they are being removed.

I assume that this applies to your example. Do you know how one does that?

Also, Install Fonts does not show up as an IA command, nor is it in the Help file. Where did you find information on Install Fonts?

Thanks again for your help.

Posted: Mon Jun 25, 2007 9:11 am
by Edhy
Hi,

About the registration of the libraries, I guess you are right, in my case, it does not matter if the libraries are still registered when uninstalling, but I will check on that in order to keep the system as clean as possible at uninstall.

About the Install Font, check the Plug-In Development forum, there a couple of good ones there. Markus Diettrich an InstallAware MVP is the creator for mdPLUGINS for InstallAware wich includes the Install Fonts. Here is the direct link:
http://www.casic.de/Tools/mdPLUGINS_for ... re_en.html

Posted: Tue Jun 26, 2007 9:16 am
by jimo
Use the same set of commands just mark the Unregister option in the "Register Library" command.

Posted: Tue Jun 26, 2007 5:45 pm
by get101
jimo wrote:Use the same set of commands just mark the Unregister option in the "Register Library" command.
Where does one add this to the script? Please see below: Is this correct?

Code: Select all

if Variable REMOVE Equals TRUE
   Apply Uninstall (get result into variable Success)
   Set Variable PROGRESS to 100


   if Variable SUCCESS Equals TRUE
      if Variable SUCCESS not Equals Cancel

         Unregister Library $TARGETDIR$\\Comctl32.ocx
         Unregister Library $TARGETDIR$\\Richtx3232.ocx

      end
   end