Shared files

Got a problem you cannot solve? Try here.
khalprin
Posts: 51
Joined: Fri Aug 25, 2006 2:02 pm

Shared files

Postby khalprin » Wed Oct 04, 2006 12:20 pm

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

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Wed Oct 04, 2006 6:42 pm

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.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

khalprin
Posts: 51
Joined: Fri Aug 25, 2006 2:02 pm

Postby khalprin » Wed Oct 04, 2006 7:45 pm

Thanks for the response. Do I install the file as shared by checking the option that says 'Shared DLL file' (even though it's an exe)?

Thanks.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Oct 05, 2006 12:29 pm

Yes, exactly. That option is not limited just to DLLs even though it certainly sounds like it is :D
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 51 guests