Using InstallUtil and silently setting a windows service logon username/password

后端 未结 5 1549
花落未央
花落未央 2020-12-22 23:29

I need to use InstallUtil to install a C# windows service. I need to set the service logon credentials (username and password). All of this needs to be done silently.

<
5条回答
  •  佛祖请我去吃肉
    2020-12-23 00:28

    InstallUtil.exe sets StartupType=Manual

    In case you want to autostart the service, use:

    sc config MyServiceName start= auto

    (note there there has to be a space after '=')

提交回复
热议问题