Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
I've seen many solutions to secure my desktop application using c# like dongles usbtoken but in fact i don't have enough budget is there any opensource that i can use using a flash drive but i want it to be a real security something like hasp.

What I have tried:

I've seen many solutions to secure my desktop application using c# like dongles usbtoken but in fact i don't have enough budget is there any opensource that i can use using a flash drive but i want it to be a real security something like hasp.
Posted
Updated 18-Mar-17 6:29am
Comments
Afzaal Ahmad Zeeshan 18-Mar-17 10:01am    
You want, what?

Maybe it is just me, but I have no idea what you're talking about. Please be more specific in the question.
Member 12679636 18-Mar-17 11:50am    
i need to secure my desktop application so it works only when the flash drive plugged in. once the flash drive plugged out the application stopped
Afzaal Ahmad Zeeshan 18-Mar-17 12:31pm    
Please see my answer below.
Dave Kreskowiak 18-Mar-17 11:05am    
I only have the vaguest idea of what you're talking about. I've seen a project that will lock the machine if a Bluetooth item gets out of range but that's about it.

Are you saying you want the machine to lock if you take a USB device out?
Member 12679636 18-Mar-17 11:50am    
i need to secure my desktop application so it works only when the flash drive plugged in. once the flash drive plugged out the application stopped

1 solution

Then provide a read-only USB stick that contains the executable, and provide a function that checks if the executable is currently inside a removable storage or not, if in a removable storage then run otherwise halt. You can check by having a look at the path where executable is, and finding out if that is a removable storage or a physical drive etc. That depends on the operating system, Linux have a different way to mount the devices, Windows does this differently as well. But this solution will work better and easily. So you can check if the condition is met, then run otherwise stop the program from executing.

The solution that you are considering is even complex and would require much more complex programming to be done — detecting when a USB stick is attached, and detecting whether it is your USB stick or not.
 
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