1、创建:sc.exe create "Service Name" binPath= "C:\Your Program.exe"
//注:binPath=后的空格,binPath指定的是.exe文件的绝对路径。
2、删除:sc.exe delete "Service Name"
3、启动:sc.exe start "Service Name"
4、停止:sc.exe stop "Service Name"
1、创建:sc.exe create "Service Name" binPath= "C:\Your Program.exe"
//注:binPath=后的空格,binPath指定的是.exe文件的绝对路径。
2、删除:sc.exe delete "Service Name"
3、启动:sc.exe start "Service Name"
4、停止:sc.exe stop "Service Name"