468,244 Members | 2,042 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,244 developers. It's quick & easy.

How to prevent file to be copied

Hi All,

I am having a vb.net (VS 2005) application which creates some files in
the Program Files foldes ( lets say 'Test') , but as usual when i
uninstall this application i remove the folder from the Program
Files but the thing is that if the user is bright enough and he did a
copy paste to his personal before uninstalling , then he can use that
file

How can i prevent this , i got the idea of disabling the copy
functionality from the folder called 'Test'

How can i do this......any help will be appreciated

Thanks and Regards
-Sajin

Dec 29 '06 #1
3 2921
Sajin,

You have already investigated what this means for use on Vista?

Cor
"sajin" <sa***@iprlab.comschreef in bericht
news:11*********************@i12g2000cwa.googlegro ups.com...
Hi All,

I am having a vb.net (VS 2005) application which creates some files in
the Program Files foldes ( lets say 'Test') , but as usual when i
uninstall this application i remove the folder from the Program
Files but the thing is that if the user is bright enough and he did a
copy paste to his personal before uninstalling , then he can use that
file

How can i prevent this , i got the idea of disabling the copy
functionality from the folder called 'Test'

How can i do this......any help will be appreciated

Thanks and Regards
-Sajin

Dec 29 '06 #2
Why not encrypt the data you put in the file and decrypt it when you need to
use it?

Then if the user copies the file it will be of no use to him.

"sajin" <sa***@iprlab.comwrote in message
news:11*********************@i12g2000cwa.googlegro ups.com...
Hi All,

I am having a vb.net (VS 2005) application which creates some files in
the Program Files foldes ( lets say 'Test') , but as usual when i
uninstall this application i remove the folder from the Program
Files but the thing is that if the user is bright enough and he did a
copy paste to his personal before uninstalling , then he can use that
file

How can i prevent this , i got the idea of disabling the copy
functionality from the folder called 'Test'

How can i do this......any help will be appreciated

Thanks and Regards
-Sajin

Dec 29 '06 #3
On 29 Dec 2006 00:12:08 -0800, sajin wrote:
Hi All,

I am having a vb.net (VS 2005) application which creates some files in
the Program Files foldes ( lets say 'Test') , but as usual when i
uninstall this application i remove the folder from the Program
Files but the thing is that if the user is bright enough and he did a
copy paste to his personal before uninstalling , then he can use that
file

How can i prevent this , i got the idea of disabling the copy
functionality from the folder called 'Test'

How can i do this......any help will be appreciated

Thanks and Regards
-Sajin
Hey Sajin,

It's not entirely wise to store data in the program files folder. User data
should be kept in the Application Data Folder. You can get this folder like
so:

Environment.GetFolderPath(Environment.SpecialFolde r.ApplicationData)

As for preventing clever users from using their own copy or manipulating
the existing data, that will take a bit more work. Preventing copying of a
file is harder than it sounds, especially with almost everyone running as
administrator!

You'll need a very simple way of determining whether a change was made by
the application or by the user. Perhaps every time you update the user data
with the application, store a MD5 hash of the file combined with a MD5 hash
of some other data, perhaps the installation date somewhere. Then check
these every time you access the data. This way you will know:

1) If the user changed an existing data file (File MD5 will differ)
2) If the user has uninstalled and installed again (Installation date MD5
will differ)

Its not bulletproof but should keep casual "hackers" very busy
--
Bits.Bytes
http://bytes.thinkersroom.com
Dec 29 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Pekka Niiranen | last post: by
8 posts views Thread by Bryan Parkoff | last post: by
13 posts views Thread by Perecli Manole | last post: by
1 post views Thread by Andreas Bergmeier | last post: by
7 posts views Thread by perryche | last post: by
3 posts views Thread by Robert Dunlop | last post: by
5 posts views Thread by =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.