My application needs two COM DLLs to be registered. It is done automatically if the user has the necessary access rights, but otherwise it can be done using regsvr32.
Now on a few workstations the following happens:
- Start
cmd.exeas Administrator - Register first DLL: Success
- Register second DLL: Failure (0x80004005, Access denied)
The first time this error was reported to me, I automatically responded: "Of course it doesn't work, you need Administrator privileges." Needless to say, I felt pretty embarrassed as I tried to register the DLL myself...
What could be the reason for this: One DLL can be registered, the other not.
Some background information:
- Both DLLs are created with Delphi 2005.
- Both DLLs have very simple interfaces and only very few classes.
- The failing machines were always Vista or Windows 7.
Normally I'd start Process Monitor, but I don't have access to one of the workstations right now, so I have to gather as much information as possible until I can get my hands on one of them.
UPDATE: I remotely accessed one of the failing workstations. Mysterious things happened:
- Starting Process Monitor was not possible (!) After a few seconds Windows showed a "not enough memory" error.
- Switching to a different user made it possible to register the DLL. (!)
In other words:
- Log on as
UserA, startcmd.exeas Administrator,regsvr32.exe: Failure - Log on as
UserB, startcmd.exeas Administrator,regsvr32.exe: Success
What could introduce such behaviour?!