For command line installation of the license or to accept the EULA for the Scheduler account you can use RedCli

RedCli.exe license install --help

License: Install Arguments:
  -h [ --help ]             Display this message
  --to arg                  The 'to' field of the license
  --key arg                 The 'key' field of the license
  --accept-eula             Accept and agree to the terms and conditions laid out in the License Agreement

Common Arguments:
  -c [ --config-file ] arg  A configuration file that contains program options (format is INI file)
  -o [ --output-mode ] arg  Either human, json or xml.
  -l [ --log-level ] arg    Log level, 0-5 inclusive. 0=only fatal errors, 5=all logging messages


accept-eula

This RedCli command can be used with the '--accept-eula' switch for the RED Scheduler service account when that account does not allow login to the desktop. Simply place the command in a Windows Host Script in RED and run it via the Scheduler. Or run RedCli as the scheduler service account.

RedCli license install
echo 1
echo Installing license for Scheduler user
"%WSL_BINDIR%RedCli.exe" license install --to "my license name" --key "sldkfjjasnlijhsdlfj934203i9ujlaj" --accept-eula

An alternative approach to accepting the EULA for the Scheduler user is to create a Windows Host script in RED as below and run it via the Scheduler, this method assumes the license was already installed on the machine but just needs to be accepted by the Scheduler user.

Batch registry script to accept EULA
REM --- Find the existing RED LicenseAgreementAccepted registry key:value for the user
for /F "tokens=3" %%i in ('reg query HKCU\Software\WhereScape\MetaEditor\LicenseV7 /v LicenseAgreementAccepted 2^>^&1') do ( 
  if %%i==0x1 (set "regVal=Accepted") else (set "regVal=Not-Accepted") 
)

REM --- Set the RED LicenseAgreementAccepted registry key:value for the user
if not regVal==0x1 ( REG ADD HKCU\Software\WhereScape\MetaEditor\LicenseV7 /v LicenseAgreementAccepted /t REG_DWORD /d 0x1 /f >nul )

REM --- Prepare the return message
if %errorlevel% EQU 0 (
  echo 1
  echo CI/CD user initialization for RED complete
) else (
  echo -2
  echo CI/CD user initialization for RED failed, last exit code is %errorlevel%
)

REM --- Script audit summary
echo --- CI/CD user details: ---
WHOAMI /USER /FO CSV
echo --- RED LicenseAgreementAccepted state before: %regVal%
for /F "tokens=3" %%i in ('reg query HKCU\Software\WhereScape\MetaEditor\LicenseV7 /v LicenseAgreementAccepted 2^>^&1') do ( 
  if %%i==0x1 (set "regVal=Accepted") else (set "regVal=Not-Accepted") 
)
echo --- RED LicenseAgreementAccepted state after: %regVal%



  • No labels