Page 1 of 1

Registering dll not always working

Posted: Mon Jun 02, 2014 2:38 am
by Ton_B
I'm using the following code to register a component using .NET Regasm:
I'm calling the Run Program function after the Apply install, so the file to use is physically available.
After aling the Run Program, I want to check if the component has been registerd, looking for a specific regisrty key.

But, stange enought it does not always work.
Sometimes the setup will give no error, somtimes it does.

Am I missing something?


Code: Select all

 
Set Variable REGASMEXE to $WINDIR$\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe
... other code here ..

Install Files D:\Controls\dll\Mosos.Com.dll to $TARGETDIR$\Programs\DLL
... other code here ...
Apply Install

Run Program $REGASMEXE$ "$TARGETDIR$\Programs\DLL\Mosos.Com.dll" /silent (WAIT, get result into variable REGASMRESULT)
Check Registry Key HKCR\CLSID\{FF328248-86FF-4e3c-B97E-B42FB6179F93}\ into REGCHECK
if Variable REGCHECK Equals NO$KEY
    MessageBox: ERROR, Regasm.exe could not register Mosos.Com.dll$NEWLINE$$NEWLINE$Error: $REGASMRESULT$
end



Re: Registering dll not always working

Posted: Tue Jun 03, 2014 10:52 am
by FrancescoT
Dear Ton,

did you try with using "Read Registry" instead in order to get the value of "HKEY_CLASSES_ROOT\CLSID\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\InprocServer32" (where X is the GUID)?

Are you having this issue using the same identical machine? if you try to install it manually, does it work fine?

Regards

Re: Registering dll not always working

Posted: Thu Jun 05, 2014 12:31 am
by Ton_B
Reading the registry is not the problem, I think there is sometimes a problem running the Regasm command.
Does InstallAware have a build in function for registering components using Regasm?

Re: Registering dll not always working

Posted: Thu Jun 05, 2014 10:40 am
by FrancescoT
Dear Ton,

you missed to answer my previous questions;

Are you having this issue using the same identical machine?
Which is the OS and Platform (x86 - x64)?
if you try to install it manually, does it work fine?

Regards

Re: Registering dll not always working

Posted: Thu Jun 05, 2014 11:53 pm
by Ton_B
I'm sorry, I did miss that question...

I cannot pinpoint the problem to one machine.
Sometimes the setup runs fine on a dozen of machines, and suddenly one or two are giving problems.
I don't really know if the problem only persists on a 64 bits oS, but i do believe so.

Registrering it manually works just fine.

Re: Registering dll not always working

Posted: Fri Jun 06, 2014 11:31 am
by FrancescoT
Dear Ton,

if it happens when registering on a x64 target, are you sure you are using the correct REGASM EXE?

http://support.microsoft.com/kb/956933

Regards