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

ServiceControl table


4 replies to this topic

kgarvey

kgarvey
  • Full Members
  • 5 posts

Posted 05 April 2007 - 22:16

InstallShield 10.5. OS=Vista. Basic MSI.
I am installing a single .exe into the System32 folder. This is a service, and I want the service to start at end of project installation. I have an entry in the ServiceInstall table linked to this component with a Service Type = 16 and a Start Type = 2. I have a corresponding entry in the ServiceControl table with an Event bit set at 129. After installation, the SCM shows the service. It's marked as automatic, but it is not started. I've tried changing the Event bit set to '1', and the service is still not started after install. The service will start with a system restart, but this does not suit my needs. How do make the service start after the installation?


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 06 April 2007 - 01:21

Try setting the event bit to 163. This means:

* Stop / Start service during install.
* Stop / Delete service on uninstall.

I find that the above combination works best for most services.

Also set the Wait column to 1 to:
* Wait for completion of service control operation.

Regards
-Stein Åsmul

kgarvey

kgarvey
  • Full Members
  • 5 posts

Posted 09 April 2007 - 18:27

Well that was the magic decoder. Using your advice, the service is now installed and running after installation. Proves once again the lack of clarity or comprehensability in the MSDN library. dry.gif

Thanks!

kgarvey

kgarvey
  • Full Members
  • 5 posts

Posted 09 April 2007 - 20:37

Spoke (wrote) too soon. The service is not starting up on installation. The msi log file shows no failure, but the service is not starting. This is managed code, with a dependency on the hidserv service in Vista. I can start the service manually after installation, and it will start correctly on each subsequent system restart.

Is there any method I can use to determine or log what's happening when the StartServices sequence initiates?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 13 April 2007 - 15:54

If I recall correctly managed code services can only be started using a custom action, but 'm not sure about the details.