5

私の焦点はWebサーバー上です。コマンドラインを使用してWindowsサービスの起動タイプを変更する方法

Apache Webサーバーは自動タイプ(httpd -k install)でサービスをインストールしますが、Apacheはサービスを手動タイプ(MySQL:など)でインストールするためのパラメータを提供しません。

私はSCC:\Windows\System32\sc.exe)について少し読んで、SCで変更しようとしましたが、できませんでした。それで解決策は何ですか?

答えて

12

SCがこれを処理できる必要があります。エラーが発生していますか?

この「アパッチ」と呼ばれるサービスのために、スタートアップの種類を手動に設定します:

SC \\computername CONFIG apache start= demand 
+2

はい、動作します。私の間違いは_start = demand_の部分にありました。私は等号の後にスペースを入れませんでした。ありがとう。 – Mamadex

0

私は、リモートマシン上で同じ目的--change WINサービスSTARTUP METHOD--を適用する。..

C:\MrCMD> REG QUERY \\RemoteHostName\HKLM\SYSTEM\CurrentControlSet\Services\WUAUServ 

HKEY_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\Parameters 
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WUAUServ\Security 
HKEY_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 0x3 
Value Start exists, overwrite(Yes/No)? y 
The operation completed successfully. 

┌─────────────────────────────────────┐ 
│ Executed Mon 01/14/2013 14:29:57.72 │ As [MrCMD] 
└─────────────────────────────────────┘ 

C:\MrCMD> REG QUERY \\RemoteHostName\HKLM\SYSTEM\CurrentControlSet\Services\WUAUServ 

HKEY_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\Parameters 
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WUAUServ\Security 
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WUAUServ\Enum 

┌─────────────────────────────────────┐ 
│ Executed Mon 01/14/2013 14:30:37.80 │ As [MrCMD] 
└─────────────────────────────────────┘ 

これはすべての人々です。:)

関連する問題