Reputation: 916
I wanted to keep the files that are inside the application to be copy protected, so nobody can copy the files & use it for their own purpose. Only the application can read the file when it runs.
Can we achieve this?
This is an desktop application created using .net C# WPF.
Upvotes: 0
Views: 283
Reputation: 860
You can embed them in the generated exe/dll. These links can help you How to embed and access resources by using Visual C#, Images in WPF as embedded resources
Upvotes: 1
Reputation: 5140
Create a proprietary file type (say xxxx.yourextension) and use decrypt/encrypt when you read your file type within WPF and save file back when you are done.
Upvotes: 1
Reputation: 8130
You could encrypt them. Hide the unencryption key somewhere in your app. It's not foolproof but it will scare most people off.
Upvotes: 1
Reputation: 32459
You can make them hidden, but I don't think there is a way to restrict access to the application folder. If user is a local administrator, he can do whatever he wants with a files on his machine.
You also may want to obfuscate your files, if it's possible for you.
Upvotes: 1