<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>Windows Perl Scripting Forums &#187; Topic: Updating Service Entry</title>
<link>http://www.roth.net/forums/</link>
<description>Windows Perl Scripting Forums &#187; Topic: Updating Service Entry</description>
<language>en</language>
<pubDate>Wed, 22 May 2013 06:19:09 +0000</pubDate>

<item>
<title>Dave on "Updating Service Entry"</title>
<link>http://www.roth.net/forums/topic.php?id=27#post-68</link>
<pubDate>Wed, 20 Sep 2006 02:08:09 +0000</pubDate>
<dc:creator>Dave</dc:creator>
<guid isPermaLink="false">68@http://www.roth.net/forums/</guid>
<description>You can either use Win32::Lanman's ChangeServiceConfig() method or Win32::Daemon's ConfigureService() method. The latter is discussed in chapter 8 of my second book &#38;quot;Win32 Perl Scripting: The Administrator's Handbook&#38;quot; (&#60;a href=&#34;http://www.roth.net/books/handbook/&#34;&#62;http://www.roth.net/books/handbook/&#60;/a&#62;). Example 8.5 from the book briefly demonstrates how to modify a service's configuration. In your case, however, you would want to change the name of the service in the %ServiceConfig hash, remove the credentials and add the 'start_type' field:&#60;br /&#62;
&#60;br /&#62;
&#60;p&#62;&#60;code&#62;%ServiceConfig = &#38;#40;&#60;br /&#62;
&#38;nbsp; &#38;nbsp; name&#38;nbsp; &#38;nbsp; &#38;nbsp; &#38;nbsp;=&#38;gt;&#38;nbsp; 'YourServiceName',&#60;br /&#62;
&#38;nbsp; &#38;nbsp; machine&#38;nbsp; &#38;nbsp; =&#38;gt;&#38;nbsp; &#38;quot;\\\\&#38;quot; . Win32&#38;#58;&#38;#58;NodeName&#38;#40;&#38;#41;, # Represent the local machine&#60;br /&#62;
&#38;nbsp; &#38;nbsp; start_type =&#38;gt;&#38;nbsp; SERVICE_AUTO_START,&#60;br /&#62;
&#38;#41;;&#60;/code&#62;&#60;/p&#62;&#60;br /&#62;
&#60;br /&#62;
Note that you could use a start_type of:&#60;br /&#62;
	-SERVICE_AUTO_START&#60;br /&#62;
	-SERVICE_DEMAND_START&#60;br /&#62;
	-SERVICE_DISABLED&#60;br /&#62;
&#60;br /&#62;
I'll ensure that our web page on this (&#60;a href=&#34;http://www.roth.net/perl/daemon/&#34;&#62;http://www.roth.net/perl/daemon/&#60;/a&#62;) is updated to reflect this.</description>
</item>
<item>
<title>dsully on "Updating Service Entry"</title>
<link>http://www.roth.net/forums/topic.php?id=27#post-64</link>
<pubDate>Tue, 19 Sep 2006 15:54:49 +0000</pubDate>
<dc:creator>dsully</dc:creator>
<guid isPermaLink="false">64@http://www.roth.net/forums/</guid>
<description>I'd like to be able to toggle a service's start_type from AUTO to DEMAND.&#60;br /&#62;
&#60;br /&#62;
It doesn't look like Win32::Daemon can do that, except with a DeleteService() followed by a CreateService() which I'd like to avoid.&#60;br /&#62;
&#60;br /&#62;
I've been told that there are Win32::Service extensions that might help&#60;br /&#62;
&#60;br /&#62;
Thanks</description>
</item>

</channel>
</rss>
