@echo off
SetLocal EnableExtensions EnableDelayedExpansion

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Copyright (c) 2002-2025 Alexey Kuryakin daqgroup@mail.ru
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Control utility for OPC UA tools.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

set "OPTSHARE=%SystemDrive%\opt\daqgroup\share"
set "opcuacpl=%OPTSHARE%\opcua\scripts\opcua-cpl.cmd"

if not defined opcuacpl   goto :ErrorNotInstalled
if not exist "%opcuacpl%" goto :ErrorNotInstalled

call "%opcuacpl%" %*
exit /b %errorlevel%

:ErrorNotInstalled
unix tooltip-notifier text "Error: not found %opcuacpl%."
exit /b 1