Skip to contents

This function attempts to remove an NLME license using the specified installation directory and licensing tool.

Usage

remove_NLMELicense(InstallDir = Sys.getenv("INSTALLDIR"))

Arguments

InstallDir

A character string specifying the directory where the NLME Engine is installed e.g., INSTALLDIR environment variable. The cadlicensingtool executable is expected to be located within this directory, or within a subdirectory specified by the PML_BIN_DIR environment variable.

Value

A logical value indicating whether the license information was successfully removed.

Details

The function checks for the presence of the necessary `appsettings.json` file in the specified directory or the CAD config file specified by the `CAD_CONFIG_FILE` environment variable, runs the licensing tool to log out the user, and attempts to remove the NLME license.

Examples

# \donttest{
  result <- remove_NLMELicense("/path/to/install/dir")
#> Warning: File(s) execNLMECmd.ps1, TDL5.exe, libNLME7.a, libNLME7_FORT.a, libMPI_STUB.a, libLAPACK.a, libBLAS.a, libcrlibm.a, cadlicensingtool.exe, cadlicensingclient.dll
#>  not found in NLME installation directory provided:
#> INSTALLDIR=/path/to/install/dir
#> Error in remove_NLMELicense("/path/to/install/dir"): Certara.NLME8::checkInstallDir(InstallDir) is not TRUE
  if (result) {
    message("License removed successfully!")
  } else {
    message("Failed to remove license.")
  }
#> Error: object 'result' not found
# }