> For the complete documentation index, see [llms.txt](https://help.qtech.co.nz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.qtech.co.nz/datran/datran-vi-scada/datran-trending/troubleshooting/licence-will-not-stick.md).

# The licence won't stick or Enter License is greyed out

DATRAN Trending asks for a licence again, the key doesn't save, or Help > Enter License is greyed out. Usually a Windows permissions problem.

The license is saved into the computer registry when you close DATRAN Trending. Local machine admin rights are needed as you will make a registry change.

{% hint style="info" %}
**Applies to:** DATRAN Trending V5.x. V5.04 and later: a message is displayed if the user enters a licence key without admin privileges. The licence key and database connection string is stored in the local machine registry instead of the local user, so configuration is done once and not for every user. Earlier versions: on Windows 10 machines the license is held under the CURRENT\_USER in the registry so the license has to be reapplied (running the app as administrator) each time someone new logs in.
{% endhint %}

## Fix it

1. **Upgrade to V5.05.** V5.04 licensing fix: the license key didn't stick unless the application was running as administrator. See [Install and license DATRAN Trending](https://help.qtech.co.nz/datran/datran-vi-scada/datran-trending/install.md).
2. **Run Trending as an administrator.** Right click "Run as Administrator" on Trending when attempting to install license. The license is saved into the computer registry when you close DATRAN Trending, so it is advisable to do so immediately after entering the license.
3. **Check it stuck.** The warning notices should go. To be sure, log out of the PC and log back in as the user, then launch Trending with these new credentials. If the license key does not seem to have stuck it should be entered manually.
4. **Check Windows policy.** It may also not stick if the users login has a policy of not allowing the registry to be written. Sometimes this can be avoided by placing the license under LOCAL\_MACHINE in the registry especially on domains.

## Enter License is greyed out

* **V5.03 and later:** now only disables the 'Enter License' menu item if it is unable to write to the computers HKEY\_LOCAL\_MACHINE registry key. If it is greyed out, you are currently logged in as a user without administrative rights. Local machine admin rights are needed as you will make a registry change. Please log back in as an administrator and try again.
* **V5.02 and earlier:** installing Trending for the first time on some Windows 7 computers, the 'Enter License' menu item could be disabled/greyed out, despite the user being an Administrator. Previously Trending tried to determine whether the logged on user had Administrator privileges.

## Related

* The licensing is tied to the machine it is installed on. Before purchasing an extra license for Trending, or indeed transferring it to a new PC, we need the PC name and the HDD serial number. See [Enter the licence key](https://help.qtech.co.nz/datran/datran-vi-scada/datran-trending/install.md#enter-the-licence-key).
* If Trending throws the error "… is not a valid DATRAN database" even after the test connection passes, then it is probably because there is a problem with the licensing. See [Trending won't start or says it isn't a valid DATRAN database](https://help.qtech.co.nz/datran/datran-vi-scada/datran-trending/troubleshooting/not-a-valid-database.md).

## Still not working? Contact QTech

If you encounter problems, get your network administrator to contact us for further technical support. Email <techsupport@qtech.co.nz>.
