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

Registering files (dll, ocx, exe)


5 replies to this topic

yoh

yoh
  • Members
  • 8 posts

Posted 27 November 2003 - 18:21

Hello there,
does someone know the difference between register a file and share it ?
Because I have some files to copy in WINSYSDIR but for some of these files, I have to only register them, for other I have to share them, and twice for the rest.

In the XCopyFile function, it says "Always use SELFREGISTER together with the SHAREDFILE option, combining them with the bitwise OR operator".
But does this matter if I use only one option ?

In fact, I would have prefered to use XCopyFile with COMP_UPDATE_VERSION ONLY, and then register the files with regsvr32.exe.

The reason is that I want to uninstall these files by a different project, and with DeleteFile function, I can not unregister the files. But I could do it with regsvr32.exe /u.
I saw there were the UseDLL functions too.
I would like to have your opinion.
Thank you.


vuttex

vuttex
  • Full Members
  • 35 posts

Posted 03 December 2003 - 15:58

SELFREGISTER: Is the same thing as running regsvr32 on a dll or ocx. If the file is selfregistered entries will be added to the registry. And when uninstalling these will be unregistered.

SHAREDFILE: Is a indication if this file is shared with other installations/applications. If you use SHAREDFILE a ref.count will be added to the registry [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs] when the ref.count is 0 the file will be uninstalled.

Normally I would not suggest you to use regsvr32 instead of SELFREGISTER (Selected in the "File Groups" view). If you use regsvr32 you will have to unregister the files as well during uninstallation.

You should not use the UseDLL function for this. Use LaunchApp function instead.

yoh

yoh
  • Members
  • 8 posts

Posted 02 February 2004 - 16:48

> SELFREGISTER: Is the same thing as running regsvr32 on a dll or ocx. If the file is selfregistered entries will be added to the registry. And when uninstalling these will be unregistered.

--> Please where in the registry ? and which entries ?

So, when you register a new dll file, an entry is created in the registry and the count is set to one.
If you want to update this file, by overwriting the existing file, do you need to unregister it and to re-register it afterwards ?

I mean, is the entry is just a link with the complete name of the file (with the path) and the count, or is there more than that ?
Please help.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 03 February 2004 - 08:49

What information gets written to the registry during self registration depends on the file. Typically this would be CLSIDs and the like. This is NOT the shared file reference count. The latter is maintained by seting the Shared flag.

yoh

yoh
  • Members
  • 8 posts

Posted 03 February 2004 - 18:57

For the update of the files, is it mandatory to unregister the files than to register them again ?

For the uninstall, how to unregister AND unshare ?
To unregister, there is regsvr32 /u of course, but to unshare, do I need to do count -1, and if count=0 then I can delete the file ?

Thanks again.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 04 February 2004 - 13:16

If the file is marked as shared, InstallShield will take care of the ref count (incrementing at install, decremnting at uninstall)

During update you should unregister the old version and re-register the new version if the registry information (CLSIds etc.) have changed.