DLLRegisterServer failed with error code 0x80040200

  • Thread starter Thread starter fniles
  • Start date Start date
F

fniles

We can not register an ActiveX control on our Vista 32 bit machine.
When we do regsvr32 c:\windows\system32\citcp.ocx (this is a 3rd party
ActiveX control), we got an error: citcp.ocx was loaded but the call to
DLLRegisterServer failed with error code 0x80040200. I can successfully
register MSVBVM60.DLL and MFC42U.DLL. We login to the machine with a user
who is the Administrator.
I read somewhere that I need to turn off the "User Account Control" in
Vista. How can I do that ?
How can I fix this problem ?
Thank you.
 
fniles said:
We can not register an ActiveX control on our Vista 32 bit machine.
When we do regsvr32 c:\windows\system32\citcp.ocx (this is a 3rd party
ActiveX control), we got an error: citcp.ocx was loaded but the call to
DLLRegisterServer failed with error code 0x80040200. I can successfully
register MSVBVM60.DLL and MFC42U.DLL. We login to the machine with a user
who is the Administrator.
I read somewhere that I need to turn off the "User Account Control" in
Vista. How can I do that ?
How can I fix this problem ?

Register the component from an elevated command prompt. Right click on the
icon for Command Prompt on the start menu and select Run as Administrator.
You will be prompted by UAC to approve the elevation. Once the command
prompt window is open, run your regsvr32 command from that window and it
should succeed.
 
I've discovered that Vista is really picky about this. Turning off the UAC
won't help...it's a registry issue.

If the ActX controls are yours, recompile them, this will register them. If
they are third party, use the installer provided by them to install the
controls. I saw some chap had posted something about creating a batch file
to register his controls and ran the batch control as Admin. I dunno about
this as I've never tried it. I've always used the first two methods.

- Kev

| We can not register an ActiveX control on our Vista 32 bit machine.
| When we do regsvr32 c:\windows\system32\citcp.ocx (this is a 3rd party
| ActiveX control), we got an error: citcp.ocx was loaded but the call to
| DLLRegisterServer failed with error code 0x80040200. I can successfully
| register MSVBVM60.DLL and MFC42U.DLL. We login to the machine with a user
| who is the Administrator.
| I read somewhere that I need to turn off the "User Account Control" in
| Vista. How can I do that ?
| How can I fix this problem ?
| Thank you.
|
|
 
Thank you everybody. Following Tom's suggestion worked !
But, how are we going to do it for our end users ? There may be thousands of
them, so we can't just ask them to go to Command Prompt then register the
file manually. To be able to install (using Installshield) and let the
installation register all the ActiveX controls automatically, how can I do
it ?
Do I need to ask the user to turn off their UAC ?

Thanks.
 
Just be sure InstallShield is set to Register each of the ActiveX controls.
I mistakenly thought my setup was doing that, but hadn't checked the box, so
it was installing the controls in the System32 folder, but not registering
them. Then, the user gets the error you mention the first time they run the
program. Or if they run it as an Admin, it will self-register then. But it's
best to do it in your install program.

Just check for an option for each control you are using in InstallShield to
register it during the install.
 
fniles said:
Thank you everybody. Following Tom's suggestion worked !
But, how are we going to do it for our end users ? There may be thousands
of them, so we can't just ask them to go to Command Prompt then register
the file manually. To be able to install (using Installshield) and let the
installation register all the ActiveX controls automatically, how can I do
it ?
Do I need to ask the user to turn off their UAC ?

InstallShield should have an option to register a COM component. UAC should
automatically prompt to elevate when the user runs your install package so
the COM registration should succeed.
 
fniles said:
[VB6-related problem]

Please note that "microsoft.public.dotnet.languages.vb" targets the VB.NET
programming language which is not a successor of the VB6 programming
language in technology and syntax. I suggest to choose the correct
newsgroups in future.
 
Installshield is set to register the COM component, and this works in
Win2000 and WinXP, but not in Vista.
I can successfully use the elevated Command Prompt to register each control
manually, but I would like it to be done automatically.
It seems that I need to turn off the UAC and install the application, then I
can turn UAC back on.

Thank you very much for your help.
 
InstallShield certainly /should/ register the COM components in Vista,
provided it is run as an Administrator. Most setup programs are recognized
by Vista by their name (setup, install, update) and other properties, and
Vista automatically asks for an admin login. If it doesn't, you can force it
to run as an admin with Run As or with a Manifest file. Either way, if, when
run as an admin, InstallShield is not properly registering the COM
components, then it's InstallShield's fault, not Vista's. It should work,
and does with my installer. You definitely don't need to turn UAC off to
install COM components, and that's probably the last thing you want to have
"thousands of end users" do.

--
Regards,

Rick Raisley
(e-mail address removed)
~~~~~~~~~~~~~~~~~~~
HeavyMetal Software Products
www.heavymetalpro.com
 
fniles said:
How do I do this ?

To use Run As, simply right-click on the target install file, and choose Run
As Administrator. A manifest file can be included with your application
which automatically runs it as an admin (or rather asks the person running
it to approve it as an admin, assuming they have the permissions/password).
You can get information on how to make the manifest file at the following
link (among lots of others - just Google Vista Manifest):

http://www.helpware.net/VistaCompat.htm

Please note that the manifest, and Run As, do nothing to actually register
any COM components; your setup program must do that. They only help to run
the setup as an admin, which is necessary for /it/ to register the
components.
 
The suggestion from Tom really worked. Thanks Tom.



Tom Porterfield wrote:

Re: DLLRegisterServer failed with error code 0x80040200
11-Apr-07

fniles wrote

Register the component from an elevated command prompt. Right click on the
icon for Command Prompt on the start menu and select Run as Administrator.
You will be prompted by UAC to approve the elevation. Once the command
prompt window is open, run your regsvr32 command from that window and it
should succeed
--
Tom Porterfield

EggHeadCafe - Software Developer Portal of Choice
WPF DataGrid Custom Paging and Sorting
http://www.eggheadcafe.com/tutorial...f-32b2d802ae17/wpf-datagrid-custom-pagin.aspx
 
Nosa Osahon wrote in
The suggestion from Tom really worked. Thanks Tom.



Tom Porterfield wrote:

Re: DLLRegisterServer failed with error code 0x80040200
11-Apr-07

fniles wrote:

Register the component from an elevated command prompt. Right click
on the icon for Command Prompt on the start menu and select Run as
Administrator. You will be prompted by UAC to approve the elevation.
Once the command prompt window is open, run your regsvr32 command from
that window and it should succeed.

NOTE that this advice is Vista or Windows 7 focused. You can run a prompt
as administrator in XP, as well, but you will not get UAC warning.

Peace and Grace,

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Back
Top