PDA

View Full Version : Register dll



NewsArchive
01-27-2012, 01:43 AM
I need to register an activeX control that is in a dll. I can do it
manually by using regasm, but since this will need to be done on each
workstation I would like to create a install file that does it. Here is
what I would like to do:

1) When the program runs, off a network share, I check the local hard
drive c:\windows\system32 and check to see if my dll is there.

2) if the dll is not found I would copy a compiled install file from the
network share to the local machine.

3) run the install program using the Run() command and have it install
and register the dll.

4) I know how to do all of this except creating a silent install to copy
and register the dll with SetUp Builder.

Any Help??

Paul Anderson

NewsArchive
01-27-2012, 01:44 AM
When you copy the OCX file to the target machine, one of the options is to
register it. I've found it works quite well. Its under the details button in
your files visualizer.

Russell B. Eggen
www.radfusion.com

NewsArchive
01-27-2012, 01:45 AM
Paul,

You said "register DLL" but mentioned "regasm". So I assume it's a .NET
assembly and not an OCX, right? But you also said ActiveX, so I think you
have a OCX DLL.

You can use the "COM Interop Registration for .NET Assembly" option in the
File Properties or the "Register File Operation..." script function to
handle COM Interop Registration for a .NET Assembly. See attached
screenshots.

If your file is an OCX (and I think it is), use the "Register as
OCX/DLL/EXE/TLB" option in the File Properties or the equivalent "Register
File Operation..." script function.

BTW, you can use the "If File/Folder exists" script function to determine if
a particular file exists and "Copy File(s)..." to copy files.

Does this help?

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is Windows installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
01-28-2012, 03:59 AM
Friedrich,

Not to sound to stupid, but I am not sure what the dll is?? The person
that wrote it for me is out of town for a couple of days so I can not
ask. I know that I can register it manually by just running "regasm
my.dll" and it works great. I was just going to use the Clarion Run()
Command to do this, but I run into the problem that it must be run as
administer issues. So it works on some workstations and not others. My
plan was to create a SetUpBuilder install that the workstation would
copy from the network share then run. The SetUpBuilder install would
then copy my dll to the windows system32 folder and "register" it. I
don't even what the install to even display a window, just run. Any
ideas how I get SetUpBuilder to do this??

BTW I am using the latest release of your product and am using Clarion 6
for this project.

Another issue, I am compiling this project in "Local" which I normally
do not do. I am doing this because I have a number of 3rd party,
NetTalk/IQ-XML.., being used. My problem is that when I Use SetUpBuilder
to digitally sign my .exe everything works great except if I right click
on my .exe and look at properties it show all of Robert's IQ-XML
information for my product???

Paul

NewsArchive
01-28-2012, 04:00 AM
Paul,

> Not to sound to stupid, but I am not sure what the dll is?? The person
> that wrote it for me is out of town for a couple of days so I can not ask.
> I know that I can register it manually by just running "regasm my.dll" and
> it works great.

Regasm.exe is the Assembly Registration Tool to register .NET Assemblies.
It can NOT register OCX files! .NET assemblies and ActiveX are completely
different animals.

As I understand it, you are using Clarion 6 with that "DLL". You can only
use a .NET Assembly in your Win32 Clarion app if you are using the Com
Interop method (see ClarionMag)? Are you doing this?

If you are interested, you can send me the DLL and I can check for you if it
is a .NET or OCX file.

But I still think that you have an ActiveX and not a .NET assembly and so
"COM Interop Registration for .NET Assembly" would be the wrong registration
method here.

> I was just going to use the Clarion Run() Command to do this, but I
> run into the problem that it must be run as administer issues. So it
> works on some workstations and not others. My plan was to create a
> SetUpBuilder install that the workstation would copy from the network
> share then run. The SetUpBuilder install would then copy my dll to
> the windows system32 folder and "register" it. I don't even what the
> install to even display a window, just run. Any ideas how I get
> SetUpBuilder to do this??

Absolutely no problem. You can do this and SetupBuilder will not display
any window. But on UAC-aware operating systems, Windows (and not your
installer) will display the typical elevation prompt because you need
administrator execution level privileges to copy the file into the System32
folder and register the DLL.

> BTW I am using the latest release of your product and am using Clarion 6
> for this project.
>
> Another issue, I am compiling this project in "Local" which I normally do
> not do. I am doing this because I have a number of 3rd party,
> NetTalk/IQ-XML.., being used. My problem is that when I Use SetUpBuilder
> to digitally sign my .exe everything works great except if I right click
> on my .exe and look at properties it show all of Robert's IQ-XML
> information for my product???

Assuming that you did not compile Robert's version resource into your .exe
;-) This has nothing to do with code-signing. I think you simply forgot to
add a version resource to your own .exe with your own version information
(product name, version number, etc.). Do you compile such a version
resource into your .exe?

Friedrich

NewsArchive
01-28-2012, 04:01 AM
Friedrich,

> As I understand it, you are using Clarion 6 with that "DLL". You can
> only use a .NET Assembly in your Win32 Clarion app if you are using >
> the Com Interop method (see ClarionMag)? Are you doing this?

I was able to get a hold of the person that wrote the .dll and I do need
to register it as a .Net assembly, and yes we are using the Com Interop
method. So with that solved how do NOT have any dialog boxes, except
maybe the evelation warning, in my install file. I have never tried to
write an install that did not display something...LOL

> Assuming that you did not compile Robert's version resource into your
> .exe This has nothing to do with code-signing. I think you simply >
> forgot to add a version resource to your own .exe with your own
> version information (product name, version number, etc.). Do you
> compile such a version resource into your .exe?

Yes I include ALL the version resource information in the SetUpBuilder
project.

Paul

NewsArchive
01-28-2012, 04:02 AM
Hi Paul,

> I was able to get a hold of the person that wrote the .dll and I do need
> to register it as a .Net assembly, and yes we are using the Com Interop
> method. So with that solved how do NOT have any dialog boxes, except maybe
> the evelation warning, in my install file. I have never tried to write an
> install that did not display something...LOL

Aha, okay. Yes, then you have to use the "COM Interop Registration for .NET
Assembly" option in the File Properties or the "Register File Operation..."
script function to handle COM Interop Registration for a .NET Assembly.

If you are interested, you can send the file to support [at] lindersoft
[dot] com and we'll develop a project for you that installs the file into
System32 and registers it. Do you also need an uninstall?

> Yes I include ALL the version resource information in the SetUpBuilder
> project.

You have to add the version resource in your own local compiled .exe ;-) I
think you are not doing this and so it displays Robert's version resource.

Friedrich

NewsArchive
01-28-2012, 04:02 AM
Friedrich,

> If you are interested, you can send the file to support [at]
> lindersoft [dot] com and we'll develop a project for you that
> installs the file into System32 and registers it. Do you also need
> an uninstall?

That would be great, I will email the file to you. No I do not need an
uninstall.

> You have to add the version resource in your own local compiled .exe
> ;-) I think you are not doing this and so it displays Robert's
> version resource.

I know I am not, how do I do that???

Paul

NewsArchive
01-28-2012, 04:03 AM
Paul,

>
> I know I am not, how do I do that???
>

You can use the VERSIONRES.TPL template to handle this.

Friedrich

NewsArchive
01-28-2012, 04:04 AM
Paul,

> That would be great, I will email the file to you. No I do not need an
> uninstall.

Project sent. One SetupScript line will do it all. The setup will install
the BrowserControl.dll into the System32 folder and register the .NET
assembly.

Friedrich

NewsArchive
01-28-2012, 04:04 AM
You guys are the BEST!!!!

Thanks, Paul

NewsArchive
01-28-2012, 04:05 AM
Paul Anderson, TireSoft LLC wrote:
> You guys are the BEST!!!!
>

I second that!

Larry Sand