PDA

View Full Version : Subscription keys



NewsArchive
04-05-2008, 02:01 AM
Hi Friedrich,

I'm reading up on the generation and implementation of subscription keys.
I'm a bit confused on couple of points.

After I receive the order I use the sPSDK in my customer program to generate
the maintenance/subscription key based on the customer information. I send
this to the customer by email, similar to what you do.

1. What do I need to do in my program in order to allow the customer to
copy/paste the key from my email to update his maintenance plan?

2. Can I check _in my software_ if the maintenance plan has expired or can
that only be done via the Verify Subscription Key in the web update? I
realize I can create a small stub exe to verify it and return it to me, but
I would like to be able to tell the user that his software maintenance plan
will expire in 2 weeks or 4 weeks etc. Is this possible?

Basically I would like to implement similar option as you have in SB 6,
under "Help | Maintenance plan" where I can just copy/paste the keystring
that you send to me. There I can see how long it is valid. See attached
screenshot - which is pretty much what I want. How can I implement this
inside my Clarion app?

--
Arnor Baldvinsson
Icetips Creative, Inc

NewsArchive
04-05-2008, 02:02 AM
Ask Charles about all this he is the one to hold the check sub key validity
for us in the devils kiss ... :)

Do NOT send the sdk dll in your app to customers NEVER EVER

I use secwin also and simply combined both to send an XML with secwin
activation key and Setup Builder MP at the same time.....the clients drops
that and that's it !

The MP part in your app is simple enough as it is read by SB in registry :
pur a menu and a window which reads writes to registry the MP value
If you want - as I do - to let the user know till when then use a dummy
installer to check the validity date till Charles etc .....

--
Thank you

Cordialement - Best regards
Jean-Pierre GUTSATZ

CGF

Data Management Center - A tool to let you Migrate Import Export Transfer
all your Data very easily
www.dmc-fr.com
Certified by Microsoft : "Works with Vista" & "Works with Windows Server
2008"

NewsArchive
04-06-2008, 03:54 AM
Hi Arnór,

> I'm reading up on the generation and implementation of subscription keys.
> I'm a bit confused on couple of points.
>
> After I receive the order I use the sPSDK in my customer program to
> generate the maintenance/subscription key based on the customer
> information.
> I send this to the customer by email, similar to what you do.
>
> 1. What do I need to do in my program in order to allow the customer to
> copy/paste the key from my email to update his maintenance plan?

You have several options. I would suggest to display an "Edit Data
[Multiple Line]" dialog. This supports the Auto-verify Subscription
feature. Your customer can copy the key from your email and paste it
into the entry field.

> 2. Can I check _in my software_ if the maintenance plan has expired or
> can that only be done via the Verify Subscription Key in the web update?
> I realize I can create a small stub exe to verify it and return it to me,
> but I would like to be able to tell the user that his software maintenance
> plan will expire in 2 weeks or 4 weeks etc. Is this possible?
>
> Basically I would like to implement similar option as you have in SB 6,
> under "Help | Maintenance plan" where I can just copy/paste the keystring
> that you send to me. There I can see how long it is valid. See attached
> screenshot - which is pretty much what I want. How can I implement this
> inside my Clarion app?

I would suggest to create a small stub exe. Then write all information that
you need (e.g. valid until, days remaining, etc.) to an INI file. Call the
stub from your application and read/display the information. If you need
help just let me know.

Friedrich

Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
04-06-2008, 03:54 AM
Hi Friedrich,

>> 1. What do I need to do in my program in order to allow the customer to
>> copy/paste the key from my email to update his maintenance plan?
>
>You have several options. I would suggest to display an "Edit Data
>[Multiple Line]" dialog. This supports the Auto-verify Subscription
>feature. Your customer can copy the key from your email and paste it
>into the entry field.

I'm talking about my Clarion or C# application, not SB. So I need an
option in my application to do this.

>I would suggest to create a small stub exe. Then write all information that
>you need (e.g. valid until, days remaining, etc.) to an INI file. Call the
>stub from your application and read/display the information. If you need
>help just let me know.

I guess I could use the same SB compiled exe to check for this as to
accept the plan.

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
04-06-2008, 03:55 AM
Arnór,

> I'm talking about my Clarion or C# application, not SB. So I need an
> option in my application to do this.

Aha, I understand. Absolutely no problem. You don't need SetupBuilder to
"update" your maintenance id. Our own SetupBuilder IDE does also not use a
SetupBuilder application to update it. The SetupBuilder IDE (written in
Clarion) simply writes the new (updated) maintenance plan to the registry.

Friedrich

NewsArchive
04-06-2008, 03:56 AM
Hi Friedrich,

>You have several options. I would suggest to display an "Edit Data
>[Multiple Line]" dialog. This supports the Auto-verify Subscription
>feature. Your customer can copy the key from your email and paste it
>into the entry field.

Ok, let's say that I create a stub exe in SB to handle this and
checking of the maintenance plan. How does this affect the web
update? My guess is that it fails if the maintenance plan has
expired, but does the standard one do that or do I have to add the
check into a customized webupdate? (I have a customized webupdate
already, so it's no big deal, just want to have this clear:)

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
04-06-2008, 03:56 AM
Hi Arnór,

> Ok, let's say that I create a stub exe in SB to handle this and
> checking of the maintenance plan. How does this affect the web
> update? My guess is that it fails if the maintenance plan has
> expired, but does the standard one do that or do I have to add the
> check into a customized webupdate? (I have a customized webupdate
> already, so it's no big deal, just want to have this clear:)

This does not affect the web update in any way.

Please note hat the web update client (wupdate.exe) does *not* do any
subscription verification. The web update client only checks if a new
version is available. If this is the case, it downloads and starts the real
web update installation package. This is also the case if the subscription
is expired.

The web update installation package does all the subscription verification.
If the subscription is expired, you can display a message, redirect to your
order page, etc.

Friedrich

NewsArchive
04-06-2008, 03:57 AM
Hi Friedrich,

>> 1. What do I need to do in my program in order to allow the customer to
>> copy/paste the key from my email to update his maintenance plan?
>
>You have several options. I would suggest to display an "Edit Data
>[Multiple Line]" dialog. This supports the Auto-verify Subscription
>feature. Your customer can copy the key from your email and paste it
>into the entry field.

Ok, here is my logic:

I create an exe in SB that does the following:

1. Opens a dialog box where the customer can paste the maintenance
plan.

2. Calls the Verify Subscription to gather the information from the
new plan.

3. Write the subscription information to a registry key (pr. my
design) where I can grab it at any time in my software.

4. Return 0/1 in runcode to the exe to indicate if the operation was
succesful.

I presume that the Web Update will figure out the rest with a Verify
Subscription call or something.

Does this make sense?

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
04-06-2008, 03:59 AM
Hi Arnór,

> I create an exe in SB that does the following:
>
> 1. Opens a dialog box where the customer can paste the maintenance
> plan.
>
> 2. Calls the Verify Subscription to gather the information from the
> new plan.
>
> 3. Write the subscription information to a registry key (pr. my
> design) where I can grab it at any time in my software.
>
> 4. Return 0/1 in runcode to the exe to indicate if the operation was
> succesful.
>
> I presume that the Web Update will figure out the rest with a Verify
> Subscription call or something.
>
> Does this make sense?

Yes, this does make sense. But you can also use a dialog in your Clarion or
C# where the customer can paste the maintenance plan. Then call into an EXE
created with SetupBuilder that does the subscription verification.

BTW, what we do in our own SetupBuilder IDE is the following. The IDE opens
a Clarion dialog box where the customer can paste the maintenance plan.
After the verification process, the maintenance key is written to registry.
IMPORTANT: if the IDE is running elevated, it is written to a
HKEY_LOCAL_MACHINE key. If it is running unelevated, it is written to a
CURRENT_USER registry key. The web update installer package can handle this
scenario. It checks the HKEY_LOCAL_MACHINE key first to verify the
subscription. If it is valid, it continues with the installation. If it is
invalid, it checks the CURRENT_USER key. If this retrieved value is valid,
it continues - otherwise, the installation is aborted.

Of course, you can do whatever you want with the subscription key. Write it
to the registry, to an INI or ASCII text file, write it to a TPS, SQL, or
whatever database file.

Does this help?

Friedrich

NewsArchive
04-06-2008, 03:59 AM
Hi Friedrich,

>Yes, this does make sense. But you can also use a dialog in your Clarion or
>C# where the customer can paste the maintenance plan. Then call into an EXE
>created with SetupBuilder that does the subscription verification.

So how does this work??? I'm more confused than before<g>

1. I create the MT key and email it to the client.

2. He pastes it into a text box in my program

Where does my program need to store it?

3. I call an exe made with SB to verify.

My guess is that this exe needs to call "Verify subscription" Somehow
it needs some data to verify it. Where does it get that data?

I'm just not seeing the connection between my program and the
verification process. I'm not finding exactly where and how this
verification happens???

Do you have an example of this process? ( have the sdk installed but
haven't checked if there were any demos that apply to this)

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
04-06-2008, 04:00 AM
Arnor,

The updater verifies what you tell him to verify
meaning the client pastes his MP and _you_ tell _your_ program to write to
anywhere _you_ decide
then the updater checks from where _you_ tell him to retreive the MP.....

If you want I can send you a copy of my wupdate for DMC plus the dummy exe
to check the validity of MP

Now regarding checking for a newer version is another story
I simply use a dummy wupdate made in SB also ......and if the result is etc
etc etc ... then I launch the real updater

This techniques let's me add a simple do you want to re-update the app if
the version is the same as on site ...which can be usefull

All depeneds on where _you_ write the entry...I simply put it in reg under
app and mp at HKCU

--
Thank you

Cordialement - Best regards
Jean-Pierre GUTSATZ

CGF

Data Management Center - A tool to let you Migrate Import Export Transfer
all your Data very easily
www.dmc-fr.com
Certified by Microsoft : "Works with Vista" & "Works with Windows Server
2008"

NewsArchive
04-06-2008, 04:01 AM
Hi Jean-Pierre,

>The updater verifies what you tell him to verify
>meaning the client pastes his MP and _you_ tell _your_ program to write to
>anywhere _you_ decide
>then the updater checks from where _you_ tell him to retreive the MP.....

This contradicts what Friedrich just said "Please note hat the web
update client (wupdate.exe) does *not* do any subscription
verification."

There are some parts missing from the picture.

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
04-06-2008, 04:02 AM
> This contradicts what Friedrich just said "Please note hat the web
> update client (wupdate.exe) does *not* do any subscription
> verification."
>
> There are some parts missing from the picture.

Arnor,

What Friedrich said is true (of course<g>).

The wupdate.exe does not do anything other than check to see if an update
is available and download it if the user requests it to (of course SOME
wpdate.exe programs do that better than others - but more on that soon<g>).


It is up to you to store the maintenance plan key where ever you want it to
be stored.

SetupBuilder does not know - does not care.

When your installer runs, you retrieve the key from where ever you stored
it (Registry, INI file ... etc) then you use the SB function to verify that
the key is still valid.

If it is - you do the install, if not you send the user to the website to
buy an renewal.

I think the part that your getting confused with is that you expected SB to
store the key somewhere on its own - it doesn't.

It just has the functions to tell you if a key is valid and/or expired.


Does that help?


Charles


--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
04-06-2008, 04:03 AM
Hi Charles,

>wpdate.exe programs do that better than others - but more on that soon<g>).

I plan on using that next week, so you need to get going!<g>

>I think the part that your getting confused with is that you expected SB to
>store the key somewhere on its own - it doesn't.
>
>It just has the functions to tell you if a key is valid and/or expired.
>
>Does that help?

YES. You are correct, I expected this needed to be stored in a
specific location, kind of like the Web Update information are stored
in a specific registry key, where it - and I if I feel like it - can
verify it.

I think I have this figured out now. it would be cool if Friedrich
could make SB compile all these useful functions into a dll that could
be called instead of an EXE<g>

I'll holler if I need help on this:)

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
04-06-2008, 04:04 AM
>>wpdate.exe programs do that better than others - but more on that soon<g>).
> I plan on using that next week, so you need to get going!<g>

;-)

I'm working all weekend (around 20 out of 24 hours) to see if it can't be
available by the first of the week<g>.

> YES. You are correct, I expected this needed to be stored in a
> specific location, kind of like the Web Update information are stored
> in a specific registry key, where it - and I if I feel like it - can
> verify it.

Yeah until you look at the Verify SN and Verify SK Security Functions
closely it is easy to miss that they work on variables (and that it is up
to you to populate them from a Registry key, INI file or whatever.


> I think I have this figured out now. it would be cool if Friedrich
> could make SB compile all these useful functions into a dll that could
> be called instead of an EXE<g>

In the interim you should be able to simply pass the data to be verified to
the exe on the command line and return a error code to indicate valid,
invalid or some error condition.

> I'll holler if I need help on this:)

Do that!

It's not like you don't know where to find me and I almost never need my
"beauty sleep".

;-)

Charles



--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
04-06-2008, 04:05 AM
Charles,

Did you say Monday meaning tomorrow or Monday ? <BG>

Thanks for all that work you are doing for all of us again :)

--
Thank you

Cordialement - Best regards
Jean-Pierre GUTSATZ

CGF

Data Management Center - A tool to let you Migrate Import Export Transfer
all your Data very easily
www.dmc-fr.com
Certified by Microsoft : "Works with Vista" & "Works with Windows Server
2008"

NewsArchive
04-06-2008, 04:06 AM
> Did you say Monday meaning tomorrow or Monday ? <BG>

LOL - I am afraid to say!

The next thing I know someone will add a (tm) to Monday and then none of us
will be able to use it again.

> Thanks for all that work you are doing for all of us again :)

I'm glad to be back on this side of the development fence for a while<g>

BTW - check your email.

;-)

Charles


--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
04-06-2008, 04:07 AM
Arnor,

Sorry I was talking of the updater script and not the wupdate one of course

--
Thank you

Cordialement - Best regards
Jean-Pierre GUTSATZ

CGF

Data Management Center - A tool to let you Migrate Import Export Transfer
all your Data very easily
www.dmc-fr.com
Certified by Microsoft : "Works with Vista" & "Works with Windows Server
2008"

NewsArchive
04-06-2008, 04:08 AM
to complete the picture, does this dummy sb exe, dmcplan.exe in your case,
is generic so you can pass to him parameter(s) from main program, or it's tight
closed with everything needed?
thanks for explanation
Darko
Clarion 6.3 9056

>
>If you want I can send you a copy of my wupdate for DMC plus the dummy exe
>to check the validity of MP
>

NewsArchive
04-06-2008, 04:09 AM
Darko,

That exe was written for DMC meaning it checks only the DMC settings and
cannot be used for any other app
But it is easy enough to change the script for any other app .... and I do
not use any command line options

--
Thank you

Cordialement - Best regards
Jean-Pierre GUTSATZ

CGF

Data Management Center - A tool to let you Migrate Import Export Transfer
all your Data very easily
www.dmc-fr.com
Certified by Microsoft : "Works with Vista" & "Works with Windows Server
2008"