Re: Software activation codes and storage, your thoughts please

From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 03/24/05


Date: Thu, 24 Mar 2005 15:00:37 -0500

Joe,

    Your only option here is going to be to use the registry. You should
probably store it in the HKEY_LOCAL_MACHINE hive, under the software key.
This is the only thing that one could guarantee would work on windows 98.

    Honestly though, I don't know how much longer 98 is going to be around,
and I personally wouldn't target an app for that OS. Then again, my needs
are different =)

    If you could eliminate 98 from the picture, I would recommend using
Isolated Storage, as it would give your application a space that it could
read/write files from/to, without having to worry about access rights and
whatnot.

    Hope this helps.

-- 
               - Nicholas Paldino [.NET/C# MVP]
               - mvp@spam.guard.caspershouse.com
"Joe_Black" <JoeBlack@newsgroups.nospam> wrote in message 
news:u$Y1f1GMFHA.1396@TK2MSFTNGP10.phx.gbl...
> Hi all,
>
> I have an app that I want to have activation codes for, it has plugin dll 
> files each of which have an activation code as well. I need to generate a 
> unique code that is specific to the machine that the software is installed 
> on, when the user contacts the registration server the key that they get 
> to activate there software will be unique to there machine as it will be 
> generated from the code above. Please could you look at these possibles 
> and advise on which you think is the right way to do this, or if you know 
> of a better way I would appreciate any links/code samples you may have.
>
> I could create a GUID the first time I start the app, this would be stored 
> in the registry, when validating codes I would read this value from the 
> registry, check it and activate the software if all is OK.
> BUT, I hear that the use of the registry is not a great idea any more, 
> Microsoft recommends XML files, I must store this value outside of the 
> apps directory in case the user simply copies the entire directory to a 
> new PC and all would work, maybe I could store it in Windows directory in 
> a .cfg file or something.
>
> I could use WMI to get the serial number of the mother board, I would not 
> need to store this value as it would be available through WMI at any time.
> BUT I want to the app to run on Win 98 upwards, I have heard that WMI is 
> not supported on Win 98, also I can't find any examples of how to retrieve 
> the mother board serial number.
>
> This app will be developed in VS2005, the Beta2 has a Go Live license with 
> it and the development time will be 6 - 12 months, Is there something in 
> VS2005 that would negate the need to do either of the above?
>
> Is there another way?
>
> And why do my posts always seem so long :-)
>
> Thanks Joe 


Relevant Pages

  • Re: Honestly Curious
    ... vendors to get the Windows logo on their packaging and marketing ... Microsoft themselves don't properly use the registry. ... it's a Windows app. ... About as bad as a registry-dependent package on Windows. ...
    (comp.sys.mac.advocacy)
  • Re: Mobile Service & Auto Start
    ... Great I see uses of CeRunAppAtTime and it seems like just what I need, ... As for the registry, thanks, that looks just like what I was looking for. ... Top level windows are enumerated by the running programs list, ... The app itself ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Honestly Curious
    ... This is not a real-world problem, but I give you points for being creative enough to try and dream up an excuse for my moving an app *might* be a bad thing somehow. ... The registry however is the method Microsoft not only recommends for applications to use, but they require it for vendors to get the Windows logo on their packaging and marketing material. ...
    (comp.sys.mac.advocacy)
  • Re: Mobile Service & Auto Start
    ... invalid name for the event to fire, ... that finds those standard Windows errors very nicely. ... As for the registry, thanks, that looks just like what I was looking for. ... that should work just as a regular app that just executes first right? ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Honestly Curious
    ... Windows users seem to run away from, ... directory that the app was installed in. ... applications land on the boot drive, unless the other drives are ... registry hacker (as all Windows users will eventually discover ...
    (comp.sys.mac.advocacy)