Results 1 to 12 of 12

Thread: Time expiry lock

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2004
    Location
    Melbourne Australia
    Posts
    61

    Time expiry lock

    vb.net 2003
    Hi,
    I know it is pointless saying thanks to everyone who has responded to the odd !! questions I ask from time to time but I have finally produced an app, basic one but selling OK, so thanks to all forum members. Could not have done it without the man from Ulaan Baatar and many others.

    Q.
    Is it possible to build in an "expiry date" into an app.
    I will be issuing annual updates to the app and want to make sure purchasers have to accept the update [all clearly and legally detailed in the purchase docs]
    or have their current app expire...meaning become inoperable?

    So, I think what I want is to code in the purchase date and then add 365 days to it after which time the .exe will not be usable.
    Nasty but necessary.

    thanks in anticipation and thanks to the forum managers for the happy birthday wish recently, very impressed!!
    Grandpa

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Time expiry lock

    It's possible but there's no way to make it completely secure. You have to store the data somewhere so the user can find it and change it if they are clever enough. You also have to know if the user has changed their clock to an earlier time. Basically you need to record the time when the app is installed and each time it's run. Each time it runs you need to test the current time against those two to make sure it's not past the expiry or before the last run time. When you record the data it needs to be well hidden, so put somewhere that isn't easily identifiable and the data should be encrypted. There are licensing components that will do all this for you. I've used Quick License Manager and Infralution Licensing System, which are both cheap and relatively easy to use.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,950

    Re: Time expiry lock

    Checking the date on system logs is a useful way to find out whether the user has changed the computer clock.

    Having been around this loop a few times myself, I too would recommend using a 3rd party licensing tool. These can be time or execution based, permit extensions, lock to a specific computer, interface directly onto ecommerce sites etc.

    I have used http://www.advancedinstaller.com and also www.exeshield.com for this purpose in the past.

    For any licensing system, I would also recommend using some kind of obfuscation to prevent reverse engineering of your code. Inevitably, your code will have a path in it or maybe a filename somewhere, this can be extracted. A hacker cannot see your actual code but can see a representation of it, so this exposes any protection you may be using. Obfuscation is not totally secure but raises the bar a notch higher so most hackers will give up and move on.

  4. #4

    Thread Starter
    Member
    Join Date
    Oct 2004
    Location
    Melbourne Australia
    Posts
    61

    Re: Time expiry lock

    Thanks, I have downloaded the two progs you suggested and will try them out over the next few days.
    Grandpa

  5. #5

    Thread Starter
    Member
    Join Date
    Oct 2004
    Location
    Melbourne Australia
    Posts
    61

    Re: Time expiry lock

    Sorry JMc, I responded to your helpful advice then realised that Bulldog had also replied with two other prog suggestions...
    So my response might seem to refer to his reply and ignore yours.

    I have actually downloaded all four suggested prog but Bulldog
    what the hell is
    obfuscation
    ?

    I am a real [and old] learner here and have never heard of the word.

    I do want to protect my prog as it will be distributed by others around the world so all of this is most helpful

    Thanks, Bill
    Grandpa

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Time expiry lock

    .NET apps are compiled to MSIL, which can be decompiled to a fairly close replica of your original source code. Obfuscation makes the decompiled code harder to understand, thus less useful to those who would steal it. The stronger the obfuscation the harder to decipher the decompiled code becomes, but generally the more expensive the tool to implement it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    Member
    Join Date
    Oct 2004
    Location
    Melbourne Australia
    Posts
    61

    Re: Time expiry lock

    thanks jmc...and I loved the bit about
    "decompiled code harder to understand"
    trust me, at my knowledge level, its all hard to understand.

    Pushing my luck here but...

    Is there any way of adding some kind of "tooltip" [which I use on most links in my app] to menus and their 'children'. This would make my life a lot easier as the programme has tons of menu links to website.

    Bill
    Grandpa

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Time expiry lock

    Quote Originally Posted by Bill Healy
    Is there any way of adding some kind of "tooltip" [which I use on most links in my app] to menus and their 'children'.
    Look first, ask questions later. Take a look at the properties of the ToolStripMenuItem class and you'll find your answer. Just select a menu item and open the Properties window, then look at ALL of the available properties. If you don't know what members a class has you can't know that it can't do what you want. That should always be your first step.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  9. #9

    Thread Starter
    Member
    Join Date
    Oct 2004
    Location
    Melbourne Australia
    Posts
    61

    Thumbs up Re: Time expiry lock

    Hi JMc...
    I appreciate your frustration with questions like mine re tool tips on menus.

    Perhaps there should be a section for rank beginners to stop wasting the time of experts like yourself.

    For the record I do check the properties in full before asking questions, I also search the forum, but with my menu properties there is no mention of toolstripmenuitem.

    In fact nor is it in my declarations. I can't even get help on it so that is why I posed the question.

    Anyway, thanks for the help.
    Grandpa

  10. #10
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Time expiry lock

    What version are you using? There are radio buttons provided so you can specify when starting a thread. That way we don't waste anybody's time posting information that is not relevant to the version you're using.

    If you're using 2005, which most people will assume if you don't specify, then you should be using the MenuStrip or ContextMenuStrip components, each of which contain ToolStripMenuItem objects. If you select a menu item and open the Properties window you should see a ToolTipText property.

    If you're using 2003 then you'll be using MainMenu or ContextMenu components, which each contain MenuItem objects. At a glance I can't see any tool tip related properties in that class so I'm guessing that that's what you're using. Can you confirm that?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  11. #11

    Thread Starter
    Member
    Join Date
    Oct 2004
    Location
    Melbourne Australia
    Posts
    61

    Re: Time expiry lock

    Sorry JMc
    I use vb.net 2003

    Bill
    Grandpa

  12. #12

    Thread Starter
    Member
    Join Date
    Oct 2004
    Location
    Melbourne Australia
    Posts
    61

    Re: Time expiry lock

    Yes, I use MainMenu in vb2003


    Bill
    Grandpa

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width