My company has applications that share a few files. One of the shared files is a service with COM interfaces. During an install, I use the Run Program command to run the service with a "/service" command line to install it as a servce (in the scm) and to register the COM interfaces.
How can I determine when it is OK to remove this file? I don't want to uninstall (use a Run Program command with "/ungregserver", or stop/remove the service from the scm) until the last program sharing the file is being uninstalled?
Thanks
Shared files
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
I would install the file as a shared file. That way, Windows keeps in its registry a reference count for each time the file has been installed (the location where it keeps this should be easy to find with a quick Google search).
Then, you may easily go ahead and check that count, and if it indicates that you are the last copy installed, unregister the file using Run Program as you have described.
Then, you may easily go ahead and check that count, and if it indicates that you are the last copy installed, unregister the file using Run Program as you have described.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Yes, exactly. That option is not limited just to DLLs even though it certainly sounds like it is 

Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 47 guests