+ case UI_MENU_MANAGE_STOP:
+
+ /* Stop OSSEC */
+ ret_code = os_stop_service();
+ if (ret_code == 1) {
+ config_read(hwnd);
+ gen_server_info(hwnd);
+
+ SendMessage(hStatus, SB_SETTEXT, 0, (LPARAM)"Stopped");
+ MessageBox(hwnd, "Agent stopped",
+ "Agent Stopped", MB_OK);
+ } else {
+ MessageBox(hwnd, "Agent already stopped",
+ "Agent Stopped", MB_OK);
+ }
+ break;
+ case UI_MENU_MANAGE_STATUS:
+ if (CheckServiceRunning()) {
+ MessageBox(hwnd, "Agent running",
+ "Agent Running", MB_OK);
+
+ } else {
+ MessageBox(hwnd, "Agent stopped",
+ "Agent Stopped", MB_OK);
+ }
+ break;
+ case UI_MENU_MANAGE_RESTART: