Issue #18347 has been updated by Josh Cooper.
The following ruby code will set the puppet service start type to manual, where
ARGV[0] is the path to the msi:
<pre>
require 'win32ole'
MsiOpenDatabaseModeReadOnly = 0 # Opens a database read-only, no persistent
changes.
MsiOpenDatabaseModeTransact = 1 # Opens a database read/write in
transaction mode.
MsiOpenDatabaseModeDirect = 2 # Opens a database direct read/write
without transaction.
SERVICE_AUTO_START = 0x00000002 # A service start during startup of the
system.
SERVICE_DEMAND_START = 0x00000003 # A service start when the service
control manager calls the StartService function.
SERVICE_DISABLED = 0x00000004 # Specifies a service that can no
longer be started.
installer = WIN32OLE.new('WindowsInstaller.Installer')
db = installer.OpenDatabase(ARGV[0], MsiOpenDatabaseModeDirect)
begin
view = db.OpenView("Update ServiceInstall Set StartType=
#{SERVICE_DEMAND_START}")
view.Execute
ensure
db.Commit
end
</pre>
----------------------------------------
Feature #18347: Puppet for Windows: Command Line option for Startup type
https://projects.puppetlabs.com/issues/18347#change-80879
Author: Reid Vandewiele
Status: Accepted
Priority: Normal
Assignee:
Category: windows
Target version:
Affected Puppet version:
Keywords: windows msi installer
Branch:
Q: Is it possible to install Puppet with the MSI but without starting the
service?
Currently, it looks like there is no option to specify when performing an
automated install of Puppet for Windows that the service should not be started.
It should be possible to pass an MSI option to specify that the service should
not be started when the installation completes.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.