cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vishualsoft
Level 2

How to register dll using Installshield

Hi All,

I am new for Installshield.

I am including a dll which is not getting registered after setup (which i have created using installshield ) was installed.

Installation time there is no error but when i open perticular form in an installed application, i am getting an error "Class Not Registered".

Any way to overcome this problem.


Thanks in advance.


Vishal
Labels (1)
0 Kudos
(8) Replies
J_anitha
Level 8

If you are adding dll in component with dynamic linking, you'll get a checkbox option for self-registering files. You can use it to register your dll.

Or else in script, you can do it by:
LaunchAppAndWait(WINSYSDIR ^ "Regsvr32.exe", "/s " + "\"" + dll absolute path+ "\"", WAIT);
Try it!
0 Kudos
MarkTucker
Level 3

Sorry, I also new to Installshiled and have same question about registering DLLs.

Hence, please could you explain where the tick box (mentioned above) hides in IS 2021 R1?

Thanks

0 Kudos
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

The best option for .dll registration is to have Installshield register the file when the Installer is built (Rather than registering the file when the installer is run)

When we register the .dll during the build, the registry data is added directly into the MSI tables making it part of the installer.
This means that the data is handled as part of all normal MSI processes such as uninstall, upgrades, repair etc.

If you register with an action when the installer is run then this is happening outside of the installation context and you would need a custom mechanism to handle it during uninstall. repair, upgrade etc.

You can register the file during the build with the following setting in Installshield:
ORGANIZATION > Components > Select your Component > COM Extract at Build = Yes

Be aware that Installshield will only extract the COM data from key file of that component.

You can also have Installshield extract the data from the file when you add the file to the project (rather than at build) - this way you can look the registry view and check the correct information is being added.

From the Top Ribbon select TOOLS > Options > Preferences Tab > Self-registration > COM Extraction will occur immediately when the file is added

I hope this information helps.
Stuart

0 Kudos

Thanks for the info, shunt.

I tried this and it had an effect, but still all is not well.  I now get:

   "warning -4354: The build was unable to extract information from the file ..... .dll"

Please let me have any ideas how to overcome this.

Thanks

 

0 Kudos
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

As a test, on a clean test machine are you able to run regsvr32 against that same .dll? This would tell us where the issue sits.

Check that you are running Installshield with admin permissions (if its running within Visual Studio as a standard user this could prevent the COM extract)
Also check that the .dll has no file dependencies that it is looking for which is causing the COM extract to fail.

0 Kudos

Thanks for your time.

i) No, I cannot run regsev32 against this dll because it's 64-bit.  However, use of regasm works fine on a clean machine which is running 64-bit Windows 10.

ii) Yes, I am running Installshield when logged in to the server as admin: I have IS 2021 R1, running under Windows Server 2012 R2.  I am running from the Installshield GUI (i.e. not within Visual studio).

iii) I cannot see any further dependencies.  However, I do not know how to _prove_ that there are no others - do you have any ideas on how I might do that, please?

Thanks again

0 Kudos

Hi @MarkTucker,

Thank you for your post.

i) You could try manually registering the dll with the 64-bit copy of regsvr32.exe in the C:\Windows\System32 folder instead of the 32-bit copy of regsvr32.exe in the C:\Windows\SysWOW64 folder.

iii) You could try using the free tool, Dependency Walker, to determine the dependencies. More information about Dependency Walker can be found online.

Please give these suggestions a try. Do they work for you?

Please let us know if you have any questions or concerns. Thanks!

0 Kudos
MarkusLatz
Level 8

You can also use:

regasm MyTest.dll /regfile:C:\Temp\MyTest.reg

This creates a reg file with the extracted registry info from the dll. Import this into the appropriate component. Take a look at the reg file, that everything is correct.

regards

Markus

0 Kudos