The Windows Installer requires the KeyPath of the Component with a ServiceInstall element ot be the file that is the service. Said a different way, you must mark the Tomcat 6 service executable (tomcat.exe?) File element with KeyPath="yes". Then put the ServiceInstall element in the same Component.
If you are not installing the Tomcat 6 service executable yourself then you do have to turn to a custom action. Remember with a custom action to think about repair/upgrade/uninstall/patching and rollback for all that. Custom actions are a lot of work.
In addition to the ServiceInstall tag, you will need to manually add a few Registry keys. This is because Tomcat uses Procrun to run as service.
You can try installing the service using service.bat and inspect the registry keys in: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\ProcRun 2.0\
For reference: commons.apache.org/proper/commons-daemon/procrun.html
发布评论
评论(2)
Windows Installer 需要带有 ServiceInstall 元素的组件的 KeyPath,而不是作为服务的文件。换句话说,您必须使用 KeyPath="yes" 标记 Tomcat 6 服务可执行文件(tomcat.exe?)File 元素。然后将 ServiceInstall 元素放在同一个组件中。
如果您不自己安装 Tomcat 6 服务可执行文件,那么您必须转向自定义操作。请记住使用自定义操作来考虑修复/升级/卸载/修补和回滚所有这些。自定义操作需要大量工作。
The Windows Installer requires the KeyPath of the Component with a ServiceInstall element ot be the file that is the service. Said a different way, you must mark the Tomcat 6 service executable (tomcat.exe?) File element with KeyPath="yes". Then put the ServiceInstall element in the same Component.
If you are not installing the Tomcat 6 service executable yourself then you do have to turn to a custom action. Remember with a custom action to think about repair/upgrade/uninstall/patching and rollback for all that. Custom actions are a lot of work.
除了 ServiceInstall 标记之外,您还需要手动添加一些注册表项。这是因为 Tomcat 使用 Procrun 作为服务运行。
您可以尝试使用 service.bat 安装服务并检查以下位置的注册表项:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\ProcRun 2.0\
供参考:
commons.apache.org/proper/commons-daemon/procrun.html
In addition to the ServiceInstall tag, you will need to manually add a few Registry keys. This is because Tomcat uses Procrun to run as service.
You can try installing the service using service.bat and inspect the registry keys in:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\ProcRun 2.0\
For reference:
commons.apache.org/proper/commons-daemon/procrun.html