Hello,
Thanks for your posting on MSDN forum.
First, let me confirm my understanding with you, you want to install the shared service application between your applications, that mean if uninstalling either of the application(app1 or app2), the service application is not uninstalled, however, if uninstalling both the application(app1 and app2), the service application is uninstalled too. Please correct me if there is any misunderstanding.
To installed a shared component, I suggest you use the Merge Module. Merge modules are used to deliver shared code, files, resources, registry entries, and setup logic to applications as a single compound file. It use a "count" internally to control the shared the component, that is when the count becomes 0, the shared component gets uninstalled. For example, if we install app1 and app2, the merge module count is 2, if we uninstall either of them(app1 or app2), the count becomes 1, if we uninstall both of them(app1 and app2), the count becomes 0 and the shared component gets uninstalled.
If you have any additional question, feel free to post here.
Thanks,
Rong-Chun Zhang
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact
msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.