NOTICE
The CICB-Server does not have the functionality to run as a service. However, we are considering adding this feature in a future release. In the meantime, here are some alternative methods to run CICB-Server as a service.
Mehod1 (Recommended)
- Download our ServiceInstaller.zip and unzip all files to C:\CICB-ServiceInstaller\*.*.
- Open a PowerShell console with administrative permissions.
- Run the following commands one by one.
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass
cd C:\CICB-ServiceInstaller\
.\ServiceInstaller.ps1
Method2
- Save the following code as a Service.py file.
- Open CMD/PowerShell with admin permission.
- python Service.py install && python Service.py start
import win32serviceutil
import win32service
import win32event
import subprocess
class MyService(win32serviceutil.ServiceFramework):
_svc_name_ = "CICB-Server"
_svc_display_name_ = "CICB-Server"
_svc_description_ = "Cyber Intel Classification Banner"
def __init__(self, args):
win32serviceutil.ServiceFramework.__init__(self, args)
self.stop_event = win32event.CreateEvent(None, 0, 0, None)
def SvcStop(self):
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
win32event.SetEvent(self.stop_event)
def SvcDoRun(self):
# Start CICB-Server.exe
subprocess.Popen(r"C:\Program Files (x86)\CICBv2\Server\server.exe")
win32event.WaitForSingleObject(self.stop_event, win32event.INFINITE)
if __name__ == '__main__':
win32serviceutil.HandleCommandLine(MyService)