activex - Why can't I register my COM DLLs? -


my application needs 2 com dlls registered. done automatically if user has necessary access rights, otherwise can done using regsvr32.

now on few workstations following happens:

  1. start cmd.exe administrator
  2. register first dll: success
  3. register second dll: failure (0x80004005, access denied)

the first time error reported me, automatically responded: "of course doesn't work, need administrator privileges." needless say, felt pretty embarrassed tried register dll myself...

what reason this: 1 dll can registered, other not.

some background information:

  • both dlls created delphi 2005.
  • both dlls have simple interfaces , few classes.
  • the failing machines vista or windows 7.

normally i'd start process monitor, don't have access 1 of workstations right now, have gather information possible until can hands on 1 of them.

update: remotely accessed 1 of failing workstations. mysterious things happened:

  • starting process monitor not possible (!) after few seconds windows showed "not enough memory" error.
  • switching different user made possible register dll. (!)

in other words:

  • log on usera, start cmd.exe administrator, regsvr32.exe: failure
  • log on userb, start cmd.exe administrator, regsvr32.exe: success

what introduce such behaviour?!

couple of things try , check for:

  1. run process explorer on machine both dll succeed registering , quick comparison of reg keys , file locations both dlls touch. there might difference explain behavior
  2. is same dll fails? happens if reverse order of registrations? it's possible first 1 affecting second 1 (by setiing acl on reg key example)
  3. it might interesting collect statistics on whether 32-bit vs. 64-bit issue. there specifics on hkcu , hklm behavior on 64-bit vista , win7, whcih might affect registration.
  4. ask users hit problem, if attempted registration regular user before doing admin. hklm virtualization playing bad tricks if case.

update

based on comment, looks failed registration attempt regular user leaving machine in messed state. it's either in hkcu\software\classes (the per-user mapping of hkcr) or in hkcr\virtualstore\machine\software (the virtualized hklm). need determine being left in registry upon unsuccessful registration attempt.

i run process explorer on clean machine , attempt non-elevated registration take snapshot.

also, try getting machine in such state , run non-elevated unregister. in ideal case should "fix" machine. if works, have quick workaround can give users while working on proper fix.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -