0

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.

Vijay Kumbhar
  • 896
  • 1
  • 13
  • 31
  • 1
    You might want to have a look at DRM solutions but even those get hacked. See: http://stackoverflow.com/questions/2552206/drm-for-videos-bundled-with-a-desktop-app – Emond May 24 '13 at 08:00
  • 1
    You should really learn the basics of how computer software works before touching any kind of software development tool with a barge pole. What you're asking for is physically impossible unless you manufactured the entire hardware and OS yourself like the iPhone. Physical access is root access; If the user can run the application, it's already cracked; etc. – Monstieur May 24 '13 at 10:49
  • 1
    Thanks Kurian for the comment, I know the basics, but the thing is if anybody has some solution around these kind of problems, then they can help here for the same. If you have any other solution or workaround & you take it in that way... would be appreciated. – Vijay Kumbhar May 24 '13 at 11:57

4 Answers4

1

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.

Andrey Gordeev
  • 30,606
  • 13
  • 135
  • 162
1

You could encrypt them. Hide the unencryption key somewhere in your app. It's not foolproof but it will scare most people off.

Rocklan
  • 7,888
  • 3
  • 34
  • 49
1

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.

S.N
  • 4,910
  • 5
  • 31
  • 51
1

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

krishnaaditya
  • 860
  • 6
  • 5