Summary
This article provides information on what the 'Shared' setting does for components and why new components are set to 'Shared' by defaultSynopsis
What effect does the 'Shared' setting have on a component?Windows keeps a reference count for files that are installed on the system. This reference count is the number of products on the system that use the file. When a file is installed, a reference count is created if it doesn't already exist or incremented if it does. This is a legacy reference counting mechanism and Windows Installer also has it's own mechanism to track which products are using which files.
Reference counts for installed files are stored in the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs
For Basic MSI and InstallScript MSI project types - If 'Shared' is set to 'Yes' for a component then a reference count is created in the registry for the key file of that component when it is installed. If this reference count does not already exist then it will be created, if it already exists then it will be incrementedFor InstallScript project types - If 'Shared' is set to 'Yes' for a component then a reference count is created in the registry for each file in that component when it is installed. If this reference count does not already exist then it will be created, if it already exists it will be incremented.
For all project types, if the 'Shared' setting is set to 'No', the reference count will still be incremented if it already exists. However, it will not be created if it doesn't exist already.
Why does InstallShield set components to 'Shared' by default?
As mentioned above, if you're using an MSI type project then Windows Installer has it's own methods for tracking which products installed which files (A list of components along with which products are using them is stored in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\<sid>\Components). However, it is still useful to use the legacy SharedDLL reference counting mechanism to make sure that shared files are not accidentally deleted by either your installer or another vendors.
If everyone who is developing installations for Windows correctly marks shared files with this flag then this reference counting mechanism would correctly make sure that files are only deleted when there is no applications using them. However, if a user forgets to change this setting for shared components in InstallShield then the default setting can have a large impact on what can happen on the target machine.
If an unshared file is incorrectly marked as shared then there is certain situations that can lead to this file being left behind on the machine after the product is uninstalled.
If a shared file is incorrectly marked unshared then this can lead to a shared file being deleted when it is still being relied upon by other applications. Possibly breaking multiple applications on the users machine.
As you can see, it could be far worse for the users machine if a shared file is incorrectly marked as unshared, potentially breaking multiple applications.
How to avoid inaccurate reference counts
If you are having a problem with files being left behind when your application is uninstalled, this can often be caused by not following Windows Installer best practices regarding components. For example, if you change the component code for a component without also changing the name or location of the key file and perform a major upgrade of your application, this can lead to an incorrect SharedDLL reference count that could cause that file to be left behind when your application is uninstalled.
These MSDN articles cover some of the basics that you should follow when creating or updating your MSI installer:
Defining Installer Components
Organising Applications into Components
Changing the Component Code
What Happens if the Component Rules are Broken?
If you need to clean up the SharedDLL ref count on a machine where it has become inaccurate, please see the InstallTalk blog post which is linked below.
Workaround
Here is an InstallTalk Blog post which talks about how you can use a script to clean up the reference counts on a machine where they have become inaccurate:Cleaning Up Your Shared DLLs Registry References for MSIs
Related Documents
HelpNet - Managing Reference Counts for Shared FilesHelpNet - Component Settings
For information on how you can use InstallShield's Automation Interface to update all of the components in your project see the following Knowledge Base Article
How to Update All Components Using the Automation Interface
Was this helpful?
Related Articles
How Components Created by Dynamically Linked Files Are Shared by Different Projects 6Number of Views Working with Shared Files and Core Components 3Number of Views AdminStudio - Creation of Application Catalog and making it Default Shared Application Catalog 7Number of Views What are the Default tcp Ports for Components of the FlexNet Publisher License Server(lmgrd and vendor daemon)? 11Number of Views Why is date checking and LM_A_CHECK_BADDATE not enabled by default? 10Number of Views
Revenera Assistant
Online
Hi, I am Reva - Ask me anything.
Updates
No new updates
Chat
Home
Updates
/**/
Thanks for the feedback!
Your feedback has been saved.Rate this response:
1
2
3
4
5
Add Additional feedback ( Optional )
0/240
English
English
Language changed successfully
Something went wrong
Email sent successfully
Something went wrong
Case create successfully
Are you sure you want to cancel
the case creation?
Please select a product to submit the case.
Please select a product version to submit the case.
0/255
Upload Attachment
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to cancel the case creation?
Case closed successfully
File Upload
Maximum file size allowed is 3 MB.
File type not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Revenera Assistant
© 2026 Flexera Software. All Rights Reserved.
Case id: 00001065
Activity: Status change: 2 hours ago