Registering dll not always working

Got a problem you cannot solve? Try here.
Ton_B
Posts: 115
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands
Contact:

Registering dll not always working

Postby Ton_B » Mon Jun 02, 2014 2:38 am

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


Ton Blokhuizen
Tooling Engineer
BMA BV - Netherlands
[i]BMA: leading the way in obstetrical data management
http://www.bma-mosos.nl[/i]

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Registering dll not always working

Postby FrancescoT » Tue Jun 03, 2014 10:52 am

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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Ton_B
Posts: 115
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands
Contact:

Re: Registering dll not always working

Postby Ton_B » Thu Jun 05, 2014 12:31 am

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?
Ton Blokhuizen
Tooling Engineer
BMA BV - Netherlands
[i]BMA: leading the way in obstetrical data management
http://www.bma-mosos.nl[/i]

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Registering dll not always working

Postby FrancescoT » Thu Jun 05, 2014 10:40 am

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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Ton_B
Posts: 115
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands
Contact:

Re: Registering dll not always working

Postby Ton_B » Thu Jun 05, 2014 11:53 pm

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.
Ton Blokhuizen
Tooling Engineer
BMA BV - Netherlands
[i]BMA: leading the way in obstetrical data management
http://www.bma-mosos.nl[/i]

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Registering dll not always working

Postby FrancescoT » Fri Jun 06, 2014 11:31 am

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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 136 guests