# Why does ReadKeys still return a key after calling DeleteKeys?

When you activate a key, QLM will, by default, store the keys (activation key and computer key) in 2 locations on the system: one location at the user level and another location at the machine level. Storing keys at the machine level is only possible when the application storing the keys is running with elevated privileges. For example, if you are using the QLM License Wizard to activate keys, and you launched the License Wizard by calling the [QlmLicense.LaunchProcess](/docs/api-reference/.net-api/qlmlicense/client-side-methods/launchprocess.md) function, the last argument of this function controls whether to launch the process with elevated privileges.

To delete the keys stored on the end-user system, you may call the [QlmLicense.DeleteKeys](/docs/api-reference/.net-api/qlmlicense/client-side-methods/deletekeys.md) function. If you call this function from your application and your application is not running with elevated privileges, DeleteKeys will only be able to delete the keys stored at the user level. The keys stored at the machine level will not be deleted. Hence, calling [QlmLicense.ReadKeys](/docs/api-reference/.net-api/qlmlicense/client-side-methods/readkeys.md) will return the keys stored at the machine level.

You have several options to address this behavior:

1. Use the QLM License Wizard to delete keys. The QLM License Wizard includes the ability to deactivate a key. Deactivation of a key includes 2 steps: deactivating the key from the server and then deleting the keys from the local system. Since the License Wizard can run with elevated privileges, it will be able to delete the keys stored at the machine level.
2. Do not store keys at the machine level. The QlmLicense.StoreKeysOptions property controls this behavior and can be set to one of these values: EStoreKeysPerUser, EStoreKeysPerMachine, EStoreKeysPerUserAndMachine (default). The drawback of this approach is that each user of a given machine will need to activate the license the first time they run your application.
3. Store keys in the Windows Common data folder. The [QlmLicense.StoreKeysLocation](/docs/api-reference/.net-api/qlmlicense/enums/estorekeysto.md) property allows you to control the location where QLM stores keys. The options are: registry, file system, or Windows Common data folder. By setting this property to **EFileCommonData,** QLM will store the license keys in the Windows CommonData folder (C:\ProgramData) where the keys are accessible to any user on the system.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.soraco.co/docs/faq/why-does-readkeys-still-return-a-key-after-calling-deletekeys.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
