Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Self-Registering?


1 reply to this topic

Scotsmanscott

Scotsmanscott
  • Members
  • 20 posts

Posted 17 November 2003 - 16:47

Thought I'd post this information in case someone else might find it useful.

I've tried many approaches to identifying self-registering COM dlls programmatically, but none of them have proved ideal.

"LoadLibrary" (as used in "Loadlib.exe") fails for 16-bit Dlls (eg:"CRYSTL16.OCX").

I've written a VBScript that uses automation to Isolate or move shared Dlls into the application folder, and needed a simple method of recognising which Dlls were registered. The folowing seems to work very well:

Findstr.exe /I /C:DllRegisterServer <DllPath>

From VBScript, the following can be used:

iErrLevel = oWsh.Run("Cmd.exe /C Findstr.exe /I /C:DllRegisterServer " & sDllPath,0,True)



Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 18 November 2003 - 00:29

Nice! I thought this might fail on a signed DLL / EXE file, but after using Authenticode to sign a COM DLL it still contained DllRegisterServer. Thanks for posting this, very useful.
Regards
-Stein Åsmul