How to Let user excute but Prevent copy exe

center1010 used Ask the Experts™
I have server on the cloud that uses as work station,
I have users which I allow to work on the station with .NET winform APP
That I wrote.
I want to let them use the EXE but prevent them from copy it (and send it by system ftp or http or Gmail)

I try give the users –traverse folder/execute file deny read –not good
Tried lots of permission combination –not good

The server is : windows server 2008 R2 datacenter

Maybe some group policy
Even if there is some recommended professional  tool to  buy
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Executing a file can only be done when reading is allowed (it's only logical?). Therefore, all the permission combinations you tried will fail one way or the other.

If you want to prevent you work to be stolen, change the .Net winform app to a webbased version (the only thing they can steal are screenshots). Behind the webserver, they can't get to the code to distribute somewhere else, only the input screens. The real code is protected.

You did most of the code already, now you only need to figure out how to display it in ASP pages.
AndyAinscowFreelance programmer / Consultant

You can not prevent it being copied.
The best you can do is prevent it being executed by an 'unauthorised' person.  How depends on your budget, how much you can change in code and 'is it worth my effort to do it'
Another thing you can try (if further developing your code to ASP pages is too much trouble for you). is to build in simple protection into your program, that it won't run on other computer.

Let your app:

Check hostname
check some registry setting with hash values
check obscure file existence

If any of those fail, quit the program. (Since the copier doesn't know what's being checked and what the values should be, and those things do not exist on his own computer, the program won't start)

A NON-.Net developer will now give up on the app (while an experienced .Net developer might get it working if you didn't obfuscate your code)
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Distinguished Expert 2018

We solved that once by using encryption that worked with dongles (Aladdin HASP) like this:
The exe would only work on computers where the dongle is inserted. So it can be copied to another machine, but there, execution fails without the dongle.


the users have some additional services on this station so the solution could be intranet ASP pages but it creates 2 additional problems:
1. the program have multiple thread and must restart the threads by the users,  how can i restart all the threads from the ASP page.
2. I prefer to not change the visual off the winform because of political problems, is there is solution , maybe to create  another winform (the same visual) which activate the main one?
Distinguished Expert 2018

Although this surely is some sort of solution, think about mine, too. If the exe is valuable, people might reverse engineer that behavior.
When we had that problem, the task was to protect a program that was said to be worth 200,000USD and we chose Aladdin HASP.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial