CICB Run as Service

Mehod1 (Recommended)

  1. Download our ServiceInstaller.zip and unzip all files to C:\CICB-ServiceInstaller\*.*.
  2. Open a PowerShell console with administrative permissions.
  3. Run the following commands one by one.
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass
cd C:\CICB-ServiceInstaller\
.\ServiceInstaller.ps1

Method2

  1. Save the following code as a Service.py file.
  2. Open CMD/PowerShell with admin permission.
  3. 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)