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

Services using files that are being deleted


7 replies to this topic

babric

babric
  • Members
  • 34 posts

Posted 01 August 2005 - 17:37

Hello,

I'm packaging some products which interacts.

One of them (Pack1) installs API (Some DLL in SystemFolder), and another one (Pack2) installs a service which uses this API.

When I uninstall Pack1, while the service of Pack2 is running or not, the uninstall process doesn't take care of the fact that the Service is using these DLLs and REMOVE them. (I can't do it myself using DEL button !!! but MSI can... rolleyes.gif it is really strong biggrin.gif ).

So, it's not like when you have application which are running and msi prevent you from closing them, (listing them).

Do you know how I could prevent the user that THIS or THIS Service (I don't know which one before the uninstall, because some other people could create a Service using my API) are running and that he should close them ?

Thanks !

Edited by babric, 01 August 2005 - 17:39.


babric

babric
  • Members
  • 34 posts

Posted 02 August 2005 - 08:46

The Shared Dll bit is set :

user posted image



More precisions :

When I install the DLL_product, the DLLs are copied to the System Folder.
When I install a Service Product and that it is running, it uses these DLLs.
When I want to delete manually these DLLs whereas they are NOT being used by a service (or something else), I can do it.
When I want to delete manually these DLLs whereas they are being used by a service, I can't do it.
When I uninstall the DD_product whereas the DLLs are being used by a service, they are deleted !

So, I have 2 solutions :

The best one is to prevent the user that ProgramX, ServiceY, ... are using files which are to be deleted. Windows installer do it perfectly for Programs, but not for Services ! How can I do that ?
The second solution would be not to delete some of the files before next reboot, but I don't know how to force it. Using the default MSI way, files are deleted...

Hope you understand my problem, I don't speak really well

Edited by babric, 02 August 2005 - 08:51.


Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 02 August 2005 - 14:07

You're looking in the wrong direction.
Pack2 should install the same components as Pack1. The components should be shared. When the last install (either Pack1 or Pack2) is removed, the components will be removed.

Consider creating a MSM for this, and include the MSM in both Pack1 and Pack2.

babric

babric
  • Members
  • 34 posts

Posted 02 August 2005 - 14:29

I'm not working on new installers, but I build an installer which must works with old installers which don't have this component... that's the problem...

Edited by babric, 02 August 2005 - 14:30.


Petch

Petch
  • Members
  • 35 posts

Posted 02 August 2005 - 14:47

You should always make .dll files that install to SystemFolder permanent. Change the attributes to 16. You will get ICE09 otherwise.

babric

babric
  • Members
  • 34 posts

Posted 02 August 2005 - 17:01

I understand, but if all the programs do it, the SystemFolder will be too big. I would like to help the user not to have uneeded files on his computer... :-)

Petch

Petch
  • Members
  • 35 posts

Posted 02 August 2005 - 17:11

I find that hard to believe. Besides...Microsoft tells you to do so.

Get rid of the dinosaurs! smile.gif

babric

babric
  • Members
  • 34 posts

Posted 02 August 2005 - 17:26

:-)

I love clean desktop, clean folders, and so, clean SystemFolder :-)

So, the user MUST like it ! I will clean all his SystemFolder, purge it !

Ooops rolleyes.gif