1.C#写的服务程序,在cmd命令行下执行:
InstallUtil.exe "C:\program files\test.exe"
如需删除服务命令:
InstallUtil.exe -u "C:\program files\test.exe"
2.windows自带的定时服务,如果要定时关闭开启程序
taskkill /im test.exe /f
1.C#写的服务程序,在cmd命令行下执行:
InstallUtil.exe "C:\program files\test.exe"
如需删除服务命令:
InstallUtil.exe -u "C:\program files\test.exe"
2.windows自带的定时服务,如果要定时关闭开启程序
taskkill /im test.exe /f