Product Key validation

Hi,Is there any plan to build in some verification information into a product key? When offline, I can put in any bogus product key. I have added a general format check to avoid total garbage being entered, but it would be kind of handy to have a check-value built in so this-is1t-otal-ly2b-bogu-s6PK-ey77 is reject prior to being on the internet.

Thx

Is there any plan to build in some verification information into a product key?

Yes, use CheckAndSavePKey(). The return code from that function will tell you if the product key is valid or not. Is this what you're talking about? Or are you talking about checking if the product key is valid on your server like in this case: SaaS and time-limited licensing?

Your first point is what I need.However, is there any limitation or calling order when using CheckAndSavePKey()? I have a valid product key that I have activated. Is there a problem to call CheckAndSavePKey again? I get a TA_FAIL return value.

Prior to installing my product, I do a activate/deactivate to validate the product key.CheckAndSavePKey();IsProductKeyValid();IsActivated();IsGenuine();Activate();Deactivate(1);

This may be overkill. If I don't do the Deactivate, subsequent CheckAndSavePKey fails. Is that what is expected?

Thx,John

Hey John,

Yes, if you've already successfully activated a product key, CheckAndSavePKey() will return TA_FAIL for any string (valid product key, or just a garbage string).

If I knew what you were trying to accomplish maybe I could guide you in the right direction. For instance, why are you activating just to check the validity of a product key? And why do you need multiple product keys for a single product on the same computer?

Can you give me a broader view of what you're trying to do?

Wyatt,There is no real "need" for me to call CheckAndSavePKey() multiple times. I was doing it because I didn't know better.So, is a Deactivate(1) all that is needed before I can (re)use another product key?

BTW, thanks for you quick response.

So, is a Deactivate(1) all that is needed before I can (re)use another product key?

Yes, calling Detactivate(1) will both deactivate and remove the product key. Then you'll be able to use another (or the same) product key to activate.

This may be something very obvious I overlooked, but any idea why the behavior when I call the LimeLM APIs from my console installation app behaves differently than when called from my Windows service?

I am using the exact same code. My console app properly detects that my product key has been revoked. My service does not.Right off the bat, from your description of CheckAndSavePKey(), (I call it just for fun) returns TA_OK from my console app while the service it fails.Also, from my service, IsActivated() incorrectly returns TA_OK.

TIA,John

TurboActivate activates per-user. A Windows Services is running as a different user than the console app. So let's say you activate from within the console app, when you use TA in your Service it will look like you're not activated (and vice versa). The other user can activate and it still only counts as 1 activation. So if the Console app and the Windows Service both activate using the same product key then it only counts as 1 activation within LimeLM.

We plan on making "system" level activations easier in the near future. Right now the best option is to accept a product key from whatever method (installer, text box, etc.) and verify it's valid using CheckAndSavePKey() then store it where your other components of your app can access it (e.g. your Windows Service). For instance you could store it in the HKLM registry key.

Does this make sense?

Yes, this makes total sense. Thx. Any idea when the change for a system-wide activation might take place?

Activation from my service is the "easy" part. It becomes a bit more complex to handle uninstall/deactivating process. 😐

Yeah, you're right. Having pre-user instead of per-system is really a hassle for cases like this. I'll see if we can squeeze in an option to do per-system activation before the end of June.

In the meantime you can send a message to your service to do the deactivation. You could use IPC (interprocess communication). Or, a quick-and-dirty method is have your service monitor a particular file on the system and when that file is created or changed by your uninstaller then deactivate the software.

Hi Wyatt,

Any update on a per-system activation? It seems the issue is still there. Our windows service does not know the offline activation after we activate from our console application. Please help. Thanks.

Hey Kay,

Per-system activation was added in TurboActivate 3.0 (nearly a year ago). When you're using CheckAndSavePKey() make sure you use the TA_SYSTEM flag.