Well for once there was good documentation that I ignored.

Answer was 
$code = $msg->ChangeStartMode("Automatic");

Thanks for helping.


SDK page:

Win32_Service.ChangeStartMode
The ChangeStartMode WMI class method modifies the start mode of a
service.

This topic uses Visual Basic syntax. For information on using this
method with C/C++, see Calling a Method.

Function ChangeStartMode( _
  ByVal StartMode As String _
) As Integer
Parameters
StartMode 
[in] Start mode of the Windows base service. Value Meaning 
Boot Device driver started by the operating system loader. This value
is valid only for driver services. 
System Device driver started by the IoInitSystem method. This value is
valid only for driver services. 
Automatic Service to be started automatically by the service control
manager during system startup. 
Manual Service to be started by the service control manager when a
process calls the StartService method. 
Disabled Service that can no longer be started. 

Return Values
Returns one of the values in the following table or any other value to
indicate an error.


Return Code Description 
0 Success 
1 Not Supported 
2 Access Denied 
3 Dependent Services Running 
4 Invalid Service Control 
5 Service Cannot Accept Control 
6 Service Not Active 
7 Service Request Timeout 
8 Unknown Failure 
9 Path Not Found 
10 Service Already Running 
11 Service Database Locked 
12 Service Dependency Deleted 
13 Service Dependency Failure 
14 Service Disabled 
15 Service Logon Failure 
16 Service Marked For Deletion 
17 Service No Thread 
18 Status Circular Dependency 
19 Status Duplicate Name 
20 Status Invalid Name 
21 Status Invalid Parameter 
22 Status Invalid Service Account 
23 Status Service Exists 
24 Service Already Paused 

Requirements
Client: Included in Windows XP, Windows 2000 Professional, Windows NT
Workstation 4.0 SP4 and later.
Server: Included in Windows Server 2003, Windows 2000 Server, and
Windows NT Server 4.0 SP4 and later.
Header: Declared in Cimwin32.mof.
Namespace: Included in \root\cimv2.


See Also
Operating System Classes, Win32_Service




--- "Trevor Joerges [SendMIME Software]" <[EMAIL PROTECTED]> wrote:

> > Just getting into this.  Trying to change the start mode
> > on the messenger service to 'auto'.  Doesn't seem to work.
> > What's wrong?  I get all the information - seems to work just
> > fine except for the Put.  Thanks
> > 
> 
> I personally use the Win32::Daemon ConfigureService() function
> to do this. It accepts the same type of service config hash as
> the CreateService function.
> 
> The default for the start_type parameter is auto start.
> 
> HTH,
> Trevor J. Joerges
> SendMIME Software
> 6 Greer Street, Stittsville
> Ontario Canada K2S 1H8
> PH 613.831.4023 . FX 613.831.4023
> [EMAIL PROTECTED]
> 



                
_______________________________
Do you Yahoo!?
Express yourself with Y! Messenger! Free. Download now. 
http://messenger.yahoo.com
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to