Offline Activation with Linux

Hello,

I am a bit confused on generating offline activation files. A bit of background: my application cannot have an internet connection, therefore it must be activated offline. It runs on Linux. I've written a separate application to generate the offline activation file. It takes the product key as a command line argument and should generate the request file. I've had some success in the development process of creating them, but the steps are not very repeatable, and I'm not sure why. Installation and activation will always be performed as a root user on CentOS 6.5.

Here are the basics of the app:

1. PDetsFromPath(TurboActivate path & filename)2. CheckAndSavePKey(product_key,TA_SYSTEM)3. ActivationRequestToFile(ActivationRequest path & filename)

That's basically it. Step 1 always succeeds. Step 2 is where the failure sometimes occur. I get a return of hr=1. I'm not sure why it is failing. In my dashboard, for that product key, there are 0 / 1 activations. I've activated it previously, but have deactivated it to test again. It worked sometimes, but not others. Moreover, I created a brand new product key for the same machine to test. Except now, I can't get past Step 2 above. I'm not sure what I changed or where I've gone wrong. I've verified that the product key string is valid using some debug printing. I'd appreciate some insight into the offline activation. For the cases I've been able to generate the request file, activating the app and running it has worked fine. Thanks!

I should mention the application is in C.

I should also mention that I've previously activated this computer. While I have deactivated that product key online using the dashboard, I haven't "deactivted" anything per se on the computer. I guess my next point is where are the product keys saved? Perhaps my issue is that I need to deactivate this computer first before I activate it again (in addition to the web side of things). I'm using this computer for testing, so I try to activate it many times as I update my applications.

Perhaps my issue is that I need to deactivate this computer first before I activate it again

Yes. You can't use 2 separate product keys for the same product version. You have to deactivate the first key from the computer before you can activate another key. So if IsActivated() returns TA_OK, then you can't use CheckAndSavePKey() until you first deactivate on the machine.

Ok that makes sense. However, since this is a debug machine with unlimited deactivations, is there a way I can just wipe out the activation data on the disk manually? I plan on just demonstrating multiple times the activation process on the same computer, and I don't necessarily want to build into my application the functionality to deactivate it. Currently, I'm using the default activation data files path. I've debated setting a custom path, but I'm not sure I need to go that route. Hence, where on the disk is the default activation data stored? Is it destructive if I delete this data?

There's not a single folder. And it has changed in the past and might change again in the future. If you don't want to build a Deactivate() call into your app, then create a separate app that calls Deactivate().

Ok Thanks. Final question, is "Deactivate" online only? Or do I need to use "DeactivationRequestToFile"? Thanks.

I think I've answered my own question with a "yes". Deactivationtofile seems to work.

Yeah, you can use either one.