473,427 Members | 1,640 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,427 software developers and data experts.

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 3185
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Bryan Rickard | last post by:
I wrote a simple program in VB6 to copy all the files from a directory on a CD-ROM to my hard disk. There are about 10 files, each about 30MB. The program uses Get and Put to get data from the...
6
by: Pekka Niiranen | last post by:
Hi, I have used the following example from win32 extensions: -----SCRIPT STARTS---- import win32file import win32con import win32security import pywintypes
4
by: cyclops | last post by:
I'm trying to do XML + XSLT -> Another XML. The source XML contains multiple namespaces and XSLT will handle all possible tags under each name space. ----source---- <document xmlns="..."...
8
by: Bryan Parkoff | last post by:
I find an interesting issue that one base class has only one copy for each derived class. It looks like that one base class will be copied into three base classes while derived class from base...
13
by: Perecli Manole | last post by:
In the forms authentication construct, I need a way to prevent ticket IssueDate and Expiration from being updated for a specific page only. By default forms authentication updates these two values...
1
by: Andreas Bergmeier | last post by:
We have a com dll inside the bin directory of a WebApplication. In asp.net 1.1 this dll stays only in the bin directory and just the interop wrapper is copied to the temporary asp.net files. In...
7
by: perryche | last post by:
Is there a way with MS Access 2002 and above to prevent people importing from a blank Database the tables in another database? I have done a lot of searches but there isn't really a solution that...
3
by: Robert Dunlop | last post by:
I am using Microsoft Visual Studio 2005 for development of an ASP.NET site, and I have a problem that greatly effects my workflow at times. It seems that after I upload new files anywhere within...
5
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a .Net web service that converts the MODCA files to tif or png file format. This web service runs on a 2003 server. This web service first copies the MODCA file to be converted to a...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.