Kaspersky offers tools and utilities that can help manage your licenses. For instance, the Kaspersky License Management Tool can be downloaded from the official Kaspersky website and used to view and manage your licenses.
If you have lost the email containing your code and cannot open the software (perhaps due to a corrupted install), your best bet is the portal. kaspersky license key file location
If you are an advanced user looking for the physical .key file stored on your hard drive—perhaps to transfer a license to an air-gapped computer (one with no internet access)—the location varies depending on your version of Windows and the specific Kaspersky product. Kaspersky offers tools and utilities that can help
Before formatting, log into My Kaspersky and deactivate the license from the old device. Then reactivate on the new PC using your 20-character code. You don’t need the .lic file. If you are an advanced user looking for the physical
Need to transfer or backup your Kaspersky license? Don't rely on screenshots. Here is the exact file path for the .key license file on Windows, plus a PowerShell trick to export it.
If you've registered your license with Kaspersky, you can recover it through your account on the Kaspersky website.