ci-server-engineer/examples/CI-Eng-Sample/remove.cmd
cliu f3e024620a Sample: demo user CIENG (no password) and group CIENG_OPERATOR
- 08_auth_group_df.qli: + CIENG_OPERATOR (factory OPERATOR actions + EXECUTE_GENERAL_COMMANDS
  for the server-side live-data Start)
- 08b_user_df.qli (new): CIENG, PASSWORD "" given explicitly, layout CIENG_Operator, initial
  display CIENG_Overview; loaded by load.cmd after 08
- 85_remove_auth_group_df.qli: removes CIENG before CIENG_OPERATOR and CIENG_VIEWER
- remove.cmd: log out every CIENG session first (a group with an open session of its user cannot
  be removed: DSSP-E-NODEL in USER_VAL; a retry stopped DSSSDA03 with DUR-F-BAD_SIZE)
- Tested on CI Server R1.03.00 2026-10-06: full remove.cmd / load.cmd (load 0 errors); CIENG
  logon with empty password on web and desktop lands on CIENG_Overview; ADMIN keeps the default
  layout; Start as CIENG; displays bind to the recreated items in a fresh session

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 10:44:52 +11:00

40 lines
3.1 KiB
Batchfile

@echo off
rem Remove CI-Eng-Sample from a CI Server R1.03 TEST system (also deletes its history).
rem Run in an elevated prompt while CI Server is running; call this script by full path.
rem Log out every CIENG session first (Operator Interface and web): an authorization group cannot
rem be removed while a session of its user is open (DSSP-E-NODEL ... in dataset USER_VAL); a retry in that
rem state stopped the DSSSDA03 process (DUR-F-BAD_SIZE) on R1.03.00 and needed a CI Server restart.
rem Order: audit report + selection group, reports, printer, OPC UA, Modbus, auth group, object, class, trigger group, storage links, stop + delete storage groups, items, sections (children first).
rem A storage group with an active unit cannot be deleted (HIS-E-GROUPHASUNT), so the
rem group first gets a stop time one minute ahead; the script waits until it has passed.
cd /d "%~dp0"
dssqld -r 79_remove_audit_df.qli -l 79_remove_audit_df.qlo
rem Reports first (they refer to TANK1.INFLOW and the destination), then destination and device.
rem A scheduled report cannot be deleted, so its schedule is cleared first.
dssqld -m 83a_stop_report_df.qli -l 83a_stop_report_df.qlo
dssqld -r 83_remove_report_df.qli -l 83_remove_report_df.qlo
dssqld -r 84_remove_printer_df.qli -l 84_remove_printer_df.qlo
if exist "%TLS_LST_PATH%\cieng_report.txt" del "%TLS_LST_PATH%\cieng_report.txt"
if exist 17_printer_df.qli del 17_printer_df.qli
dssqld -r 76_remove_item_opcua_df.qli -l 76_remove_item_opcua_df.qlo
dssqld -r 77_remove_opcua_station_df.qli -l 77_remove_opcua_station_df.qlo
dssqld -r 78_remove_opcua_line_df.qli -l 78_remove_opcua_line_df.qlo
dssqld -r 80_remove_item_eqp_df.qli -l 80_remove_item_eqp_df.qlo
dssqld -r 81_remove_modbus_station_df.qli -l 81_remove_modbus_station_df.qlo
dssqld -r 82_remove_modbus_line_df.qli -l 82_remove_modbus_line_df.qlo
dssqld -r 85_remove_auth_group_df.qli -l 85_remove_auth_group_df.qlo
dssqld -r 86_remove_object_df.qli -l 86_remove_object_df.qlo
dssqld -r 87_remove_class_df.qli -l 87_remove_class_df.qlo
dssqld -r 88_remove_trigger_df.qli -l 88_remove_trigger_df.qlo
dssqld -r 89_remove_item_his_df.qli -l 89_remove_item_his_df.qlo
powershell -NoProfile -Command "$t=(Get-Date).AddMinutes(1).ToString('dd-MM-yyyy HH:mm:ss'); \"@LANGUAGE`r`nENGLISH`r`n`r`n@VERSION`r`n1.03.00`r`n`r`n@FIELDS`r`nNAME,STOP_TIME`r`n`r`n@HIS_GROUP_DF`r`n\"\"CIENG_EVENT\"\",\"\"$t\"\"`r`n\"\"CIENG_SCAN10S\"\",\"\"$t\"\"`r`n\"\"CIENG_AGG\"\",\"\"$t\"\"`r`n\" | Set-Content -Encoding ascii 90a_stop_his_group_df.qli"
dssqld -m 90a_stop_his_group_df.qli -l 90a_stop_his_group_df.qlo
echo Waiting 75 seconds for the storage group stop time to pass...
powershell -NoProfile -Command "Start-Sleep -Seconds 75"
dssqld -r 90_remove_his_group_df.qli -l 90_remove_his_group_df.qlo
dssqld -r 90b_remove_sub_item_df.qli -l 90b_remove_sub_item_df.qlo
dssqld -r 91_remove_item_df.qli -l 91_remove_item_df.qlo
dssqld -r 92_remove_section_df.qli -l 92_remove_section_df.qlo
rem Alarm definitions last: an acknowledgement type still used by an item cannot be deleted.
dssqld -r 93_remove_alarm_df.qli -l 93_remove_alarm_df.qlo
del 90a_stop_his_group_df.qli