By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,760 Members | 1,644 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,760 IT Pros & Developers. It's quick & easy.

How to prevent file to be copied

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.