1

コマンドを使用していくつかのサービスをインストールしていますが、installutilsコマンドを使用してこれらをインストールするのに非常に問題がありSC createます。2 つのモードの違いは何ですか。コマンドからエラーは発生しませんが、一連のオプションが表示されます。私が使用している形式は次のとおりです。

SC create ZAM displayname= "ZAM" binpath="E:\ZAM\ZAM.exe" start=auto 

そして私は次のようになります:

DESCRIPTION:
        Creates a service entry in the registry and Service Database.
USAGE:
        sc <server> create [service name] [binPath= ] <option1> <option2>...

OPTIONS:
NOTE: The option name includes the equal sign.
      A space is required between the equal sign and the value.
 type= <own|share|interact|kernel|filesys|rec>
       (default = own)
 start= <boot|system|auto|demand|disabled|delayed-auto>
       (default = demand)
 error= <normal|severe|critical|ignore>
       (default = normal)
 binPath= <BinaryPathName>
 group= <LoadOrderGroup>
 tag= <yes|no>
 depend= <Dependencies(separated by / (forward slash))>
 obj= <AccountName|ObjectName>
       (default = LocalSystem)
 DisplayName= <display name>
 password= <password>

何が問題なのかわかりませんか?

4

2 に答える 2

6

「sc」を直接呼び出す代わりに、を使用することをお勧めしNew-Serviceます。パラメータは直訳です。これは、デフォルトの powershell モジュールで利用できます。

于 2013-10-25T17:26:50.440 に答える