How to change start up type of a windows service using command line How to change start up type of a windows service using command line apache apache

How to change start up type of a windows service using command line


SC should be able to handle this, are you getting any errors?

This would set the startup type to manual for a service called 'apache' :

  SC \\computername CONFIG apache start= demand


I just apply the same purpose --CHANGE WIN SERVICE STARTUP METHOD-- on a remote machine..

C:\MrCMD> REG QUERY \\RemoteHostName\HKLM\SYSTEM\CurrentControlSet\Services\WUAUServHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WUAUServ    Type    REG_DWORD    0x20    Start    REG_DWORD    0x2    ErrorControl    REG_DWORD    0x1    ImagePath    REG_EXPAND_SZ    %systemroot%\system32\svchost.exe -k netsvcs    DisplayName    REG_SZ    Automatic Updates    ObjectName    REG_SZ    LocalSystem    Description    REG_SZ    Enables the download and installation of Windows updates. If this service is disabled, this computer will not be able to use the Automatic Updates feature or the Windows Update Web site.HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WUAUServ\ParametersHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WUAUServ\SecurityHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WUAUServ\Enum┌─────────────────────────────────────┐│ Executed Mon 01/14/2013 14:27:15.31 │ As [MrCMD]└─────────────────────────────────────┘C:\MrCMD> REG ADD \\RemoteHostName\HKLM\SYSTEM\CurrentControlSet\Services\wuauserv /V Start /T REG_DWORD /d 0x3Value Start exists, overwrite(Yes/No)? yThe operation completed successfully.┌─────────────────────────────────────┐│ Executed Mon 01/14/2013 14:29:57.72 │ As [MrCMD]└─────────────────────────────────────┘C:\MrCMD> REG QUERY \\RemoteHostName\HKLM\SYSTEM\CurrentControlSet\Services\WUAUServHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WUAUServ    Type    REG_DWORD    0x20    Start    REG_DWORD    0x3    ErrorControl    REG_DWORD    0x1    ImagePath    REG_EXPAND_SZ    %systemroot%\system32\svchost.exe -k netsvcs    DisplayName    REG_SZ    Automatic Updates    ObjectName    REG_SZ    LocalSystem    Description    REG_SZ    Enables the download and installation of Windows updates. If this service is disabled, this computer will not be able to use the Automatic Updates feature or the Windows Update Web site.HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WUAUServ\ParametersHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WUAUServ\SecurityHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WUAUServ\Enum┌─────────────────────────────────────┐│ Executed Mon 01/14/2013 14:30:37.80 │ As [MrCMD]└─────────────────────────────────────┘

That's all folks.. :)