Click here to Skip to main content
15,662,459 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I need to make an app that starts with windows but don't want to use an easily removable method such as using the registry.

I've heard you can use dll injection methods.

Please could someone suggest a method of doing this pref with a code example.

I run a computer repair business and have lots of customers who don't pay the bill so I want a way to lock machines after a certain date if the bill has not been paid.

I code in c# but may be able to twist my head around a bit of c++ with the help of example code.

I dont need help with the locking app rather I need help to install the app so it becomes an integral part of the OS untill they get the unlock code, at which point I'd like to have the app uninstall itself.

I appretiate there may be some ethical implication to what I am trying to achieve but I would prefere it if any answers could be of a technical nature as I have already considered the ramifications of this project.

Thanks in advance,



I am afraid that we will not be giving you an answer. I can see why you are considering the approach you are, but what you are asking for is morally dubious - there are other approaches to dealing with bad debt, legal approaches.

Suppose that we give you the solution on how to do this, what's to stop Joe ScriptKiddy from viewing the same sample and creating a rootkit? This is a public forum, so we cannot be certain of the intentions of the people who view the pages.
Share this answer
I agree with Pete, but I also think your approach may be a bit of an overkill. I don't know who your customers are, but perhaps for the average Joe, non-advanced user, simply starting the program from the registry's Run key (opposed to the Start menu Startup) wil be enough? As I said this may not work for everyone, but perhaps 100% foolproof is not required in your case. Anyway, best of luck to you!
Share this answer
You can write all the code you want, but the first time the user has a friend/relatvie come over to "fix" their machine, and if the "fix" involves reinstalling windows, all of your efforts will be for naught.

Besides that, you probably cannot legally prevent the user from using their computer. You can disable the software you wrote, but you can't lock them out of their entire machine.

You also are not legally allowed to install spyware, malware, or viruses on another person's machine.

Finally some folks (like me) would take it personally if I found that you had installed monitoring software on my computer without my consent, and - well - let's just say your physical safety would come into question.
Share this answer
Thanks guys, I appretiate all you say. I am developing the app to use the registry for exactly the reason that most people won't know anything about the registry and so it will work ok, it's just the handful of persistant people who go looking, I'd really hate it if they solved the puzzle and thought they'd outwhitted me :), so I thought I'd go all the way!! I also have been programming for ten years after having completed a degree in computer science, it took alot of hard work as I'm not the brightest person in the world, but I love to code. As such, I have played with alot of coding concepts, I've looked on in awe when I've seen someone use dll injection as I love to get under the hood, gives me excitement shivers when I acomplish something, I've always found the tutorials difficult to understand tho and I thought this would be a great oppo to get into it. One day I'll master C++ which is a bit of a dream, maybe then, maybe :-) ....
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900