[bat] サービスの「スタートアップの種類」設定
sc.exeのconfigコマンドでサービスのスタートアップの種類を設定できます。
設定には管理者権限が必要。
sc config [サービス名称] start=[スタートアップの種類]
スタートアップの種類には以下のようなものがあります。
| 設定値 | 内容 | 
|---|---|
| auto | 自動 | 
| demand | 手動 | 
| disabled | 無効 | delayed-auto | 自動(遅延実行) | 
Windows Modules Installerサービスを自動にする場合はこんな感じ。
sc config TrustedInstaller start=auto