Preventing a 3rd-Party Program from Launching

Posted on 2006-05-12
Last Modified: 2010-04-16
I am legally :-) reselling some key stroke logger software as part of a internet protection service I offer.  Some of my less affluent clients can't pay the entire fee upfront so I'm allowing them to make install payments with a HARD final payment date.

What I want to do is write some C# program that will cause the key stroke program not to launch after a certain date if the user hasn't made all of their payments.  In other words, when I install the key stroke program, I will also install my program at the same time.  My program will count down based on the final payment date that the customer and I have agreed on.

After I have received the final payment, I will provide the user with a permanent unlock code that will keep the program running.  If I don't receive the final payment on time, the key stroke program won't run.

Obviously my program would need to run silently (not in taskbar or taskmanager) w/o the user knowing it until it was time to enter the code.

Any ideas or sample code?
Question by:jrram
    LVL 6

    Expert Comment

    hmm... i've been able to get around programs that use the date as expiration by simply changing my date on my desktop, one of them being a professional grade program (which I will not mention because I don't support this type of thing, it was more of a test).

    Just a thought about using dates as expiration.
    LVL 19

    Accepted Solution

    I recommend you encrypt a value based on the DateTime for today and for the expiration.

    Write it to a non-intuitive registry location for HKCU.

    Then, update the registry value each time the person loads the application based on the date.  Do a compare between the last time it was written and the current date.  For example, if today's date is 12-30-2005 and the date you last wrote out to the registry was 5-12-2006, you know it's a bogus system date.  Don't let the user run the app.

    Meanwhile, for the time expiration, just compare the dates and if there's time left, let it run.

    After they pay you, give them key value or something that you write out that never expires.

    LVL 35

    Assisted Solution

    >>Obviously my program would need to run silently (not in taskbar or taskmanager) w/o the user knowing it until it was time to enter the code.

    Well actually legally you need to let them know in your EULA if you are installing other programs and what the purpose is.  You don't want the lawsuits that already have precednces for people who got sued for installing separate software to do this.

    Now if it is part of your original program ,then that is different, but if it is something running all the time - separate from your program that is considered separate software and must be mentioned.
    LVL 11

    Expert Comment

    and dont forget to enrcypt your net application, otherwise its decompiled in a second and someone could checkout your algorithm for the datecheck.
    LVL 13

    Author Comment

    Thanks for all the tips guys.  I was looking for something that was already pre-coded that I could possibly customize to tell it what app I wanted to block.

    I'm guessing since none of you suggested anything like that I'll have to code it myself :-)
    LVL 13

    Author Comment

    I've decided go to against in a different direction with this.  My clients will have to pay upfront so I can avoid this coding hassle.  Simplifies my business.  Thanks for all the ideas, again!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now