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

Need help on service control in components


1 reply to this topic

emiii

emiii
  • Members
  • 4 posts

Posted 24 November 2003 - 23:21

Hi all,

I have a InstallScript MSI project. During install, before anything is done, I have to stop certain services on target machine. Once the product is installed, I need to restart those services at the end of installation. During uninstall, I also need to stop those service at the beginning, and restart them at the end.

Currently I use WINAPI to perform service related tasks and put these calls in feature install/uninstall event handlers. This works, but it adds a lot of code in my InstallScript files. I'm trying to clean up my install, and am wondering if the project would be more neat if I use the service control in component wizard.

However, if I do use the component wizard to create component that control services, I'm wondering when these service operations will actually occur. Will they occur in the execute sequence during StopServices and StartServices actions?

Moreover, if I need to stop/start a number of services, and the order is important, how can I control that?

I imagine service control is pretty common in install packages. Do people usually do it using WINAPI or component wizard? Could you give me some advises?

Thanks a lot!

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 25 November 2003 - 10:28

QUOTE (emiii @ 2003-11-24 23:21)
Will they occur in the execute sequence during StopServices and StartServices actions?

Yes