registrationName
Category: Application Control
Namespace: web.app.registrationName
Description
Get the registered user or company name from the license. Returns the name that was used during license registration, or an empty string if unlicensed.
Syntax
const regName = await web.app.registrationName();
Parameters
None
Returns
Promise<string> - Registration name, or empty string if not licensed
Example
Simple example
const name = await web.app.registrationName();
console.log('Registered to:', name);
Practical example
const name = await web.app.registrationName();
if (name) {
document.getElementById('welcome').textContent = `Welcome, ${name}!`;
} else {
document.getElementById('welcome').textContent = 'Welcome to Trial Version';
}
Advanced example
async function updateTitleBar() {
const name = await web.app.registrationName();
const isLicensed = await web.app.licensed();
let title = 'My Application';
if (isLicensed && name) {
title += ` - Licensed to ${name}`;
} else {
title += ' - Trial Version';
}
await web.window.setTitle({ title: title });
}
Use Cases
- Display personalized welcome message
- Show registration name in About dialog
- Add to window title bar
- Include in support requests
- Display in application footer
- Show in license information screen
- Personalize UI elements
- Track registered user for analytics
Error Handling
This method does not throw errors. Returns empty string if not licensed.
const name = await web.app.registrationName();
if (name) {
console.log('Licensed to:', name);
} else {
console.log('Not licensed or trial version');
}
Performance Tips
- Cache the result at startup
- Use for personalization features
- Combine with
licensed()for complete status - Store in application state
Related Methods
web.app.licensed()- Check if licensedweb.app.licenseInfo()- Get all license detailsweb.app.packageName()- Get package typeweb.app.trialInfo()- Get trial information
Notes
- Returns the name from license registration
- Empty string for trial or unlicensed versions
- Useful for personalization
- Can be company name or individual name