resetRegistration
Category: Application Control
Namespace: web.app.resetRegistration
Description
Remove registration and license data from the computer. This resets the application to unlicensed/trial state by deleting stored license information.
⚠️ Warning: This permanently removes license data. Use with extreme caution!
Syntax
const success = await web.app.resetRegistration();
Parameters
None
Returns
Promise<boolean> - True if registration was successfully removed, false otherwise
Example
Simple example
const success = await web.app.resetRegistration();
console.log('Reset successful:', success);
Practical example
const confirmed = confirm('This will remove your license. Are you sure?');
if (confirmed) {
const success = await web.app.resetRegistration();
if (success) {
alert('License removed. Application will restart in trial mode.');
await web.app.close();
}
}
Advanced example
async function transferLicense() {
const info = await web.app.licenseInfo();
if (!info.isLicensed) {
alert('No license to transfer');
return;
}
const confirmed = confirm(
`Transfer license from this computer?\n\n` +
`Registered to: ${info.registrationName}\n` +
`Package: ${info.packageName}\n\n` +
`This will remove the license from this computer.`
);
if (confirmed) {
const success = await web.app.resetRegistration();
if (success) {
alert('License removed. You can now activate it on another computer.');
await web.app.close();
} else {
alert('Failed to remove license. Please contact support.');
}
}
}
Use Cases
- Transfer license to another computer
- Reset for testing purposes
- Troubleshoot license issues
- Remove license before selling computer
- Developer testing of trial mode
- License management tools
- Support troubleshooting
- Clean uninstall preparation
Error Handling
const success = await web.app.resetRegistration();
if (success) {
console.log('License removed successfully');
} else {
console.error('Failed to remove license');
}
Performance Tips
- Always confirm with user before calling
- Restart application after reset
- Provide clear warning about consequences
- Consider backing up license key first
Related Methods
web.app.licensed()- Check license statusweb.app.licenseInfo()- Get license detailsweb.app.close()- Close application after reset
Notes
- Permanent operation - Cannot be undone
- Removes all license data from computer
- Application returns to trial/unlicensed state
- User must re-enter license key to activate
- Use only when necessary (transfer, troubleshooting)
- Always confirm with user before calling
- Consider restarting application after reset