473,289 Members | 1,940 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,289 software developers and data experts.

Lock on directory

VJ
I want to put a lock on my App's data directory (and all subdirectories
below) when my application launches, so you can't delete through explorer or
any other program. How is that possible.

VJ
Mar 14 '07 #1
8 1846
Hello VJ,
>I want to put a lock on my App's data directory (and all subdirectories
below) when my application launches, so you can't delete through explorer
or any other program. How is that possible.
I don't think that's possible, in the simple way you describe it.

One way to do it might be to keep your files open, but of course that may
have other disadvantages. Or you could fiddle around with the file system
permissions, configuring them to some more restrictive set when the
application runs and setting back the changes when it ends.

In the end, I think it would be the best idea if you just accepted that
your application doesn't own the system - it's the user's system (or at
least the system administrator's) and your application should, to a
reasonable degree, deal with problem situations that can come up while it
runs.
Oliver Sturm
--
http://www.sturmnet.org/blog
Mar 15 '07 #2
VJ
Yes. I kind floated with idea of file lock, but then gave it up as it was
bad idea. Just wanted to see if some one here might have come up with new
idea.

Yes also true, if they delete files and directory, its their problem. We can
only do a extent protection.

VJ

"Oliver Sturm" <ol****@sturmnet.orgwrote in message
news:xn****************@msnews.microsoft.com...
Hello VJ,
>>I want to put a lock on my App's data directory (and all subdirectories
below) when my application launches, so you can't delete through explorer
or any other program. How is that possible.

I don't think that's possible, in the simple way you describe it.

One way to do it might be to keep your files open, but of course that may
have other disadvantages. Or you could fiddle around with the file system
permissions, configuring them to some more restrictive set when the
application runs and setting back the changes when it ends.

In the end, I think it would be the best idea if you just accepted that
your application doesn't own the system - it's the user's system (or at
least the system administrator's) and your application should, to a
reasonable degree, deal with problem situations that can come up while it
runs.
Oliver Sturm
--
http://www.sturmnet.org/blog

Mar 15 '07 #3
"VJ" <no***********@yahoo.comwrote in message
news:u2**************@TK2MSFTNGP05.phx.gbl...
>I want to put a lock on my App's data directory (and all subdirectories below) when my
application launches, so you can't delete through explorer or any other program. How is
that possible.

VJ
Don't run as an admin or power user, and remove delete privileges from the applications
folder and sub-folders and files for non-admin or power users.

Willy.


Mar 15 '07 #4
VJ
Yes that is what we recomended to our users. But again there are power users
or the computer wizes, who mess with the application' folders and then
compalin your app does not work. The we spend time to see the log and say oh
ok you messed with file system. This again takes time and tricky. Oh well
not sure what to do catchy tricky situation. The problem is this of the
shelf product and not a in network entriprise application to control what
you want.

VJ

"Willy Denoyette [MVP]" <wi*************@telenet.bewrote in message
news:eE**************@TK2MSFTNGP04.phx.gbl...
"VJ" <no***********@yahoo.comwrote in message
news:u2**************@TK2MSFTNGP05.phx.gbl...
>>I want to put a lock on my App's data directory (and all subdirectories
below) when my application launches, so you can't delete through explorer
or any other program. How is that possible.

VJ

Don't run as an admin or power user, and remove delete privileges from the
applications folder and sub-folders and files for non-admin or power
users.

Willy.


Mar 15 '07 #5
"VJ" <no***********@yahoo.comwrote in message
news:eF**************@TK2MSFTNGP02.phx.gbl...
Yes that is what we recomended to our users. But again there are power users or the
computer wizes, who mess with the application' folders and then compalin your app does not
work. The we spend time to see the log and say oh ok you messed with file system. This
again takes time and tricky. Oh well not sure what to do catchy tricky situation. The
problem is this of the shelf product and not a in network entriprise application to
control what you want.

You won't be able to stop those who run as admin or power user and mess with the system in
an unmanaged environment.
Note, that even If it would be possible to "lock" a folder and it's sub-objects (which
isn't), they would also be able to "unlock" as well, and, what stops them from messing with
the file(s) before or after the program runs.

Willy.

Mar 15 '07 #6
VJ
You are correct, that is why as a last step I came here to see if someone
had done it. I think just legal documents and better log mangment is what is
going to keep us going for now..

VJ

"Willy Denoyette [MVP]" <wi*************@telenet.bewrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
"VJ" <no***********@yahoo.comwrote in message
news:eF**************@TK2MSFTNGP02.phx.gbl...
>Yes that is what we recomended to our users. But again there are power
users or the computer wizes, who mess with the application' folders and
then compalin your app does not work. The we spend time to see the log
and say oh ok you messed with file system. This again takes time and
tricky. Oh well not sure what to do catchy tricky situation. The problem
is this of the shelf product and not a in network entriprise application
to control what you want.

You won't be able to stop those who run as admin or power user and mess
with the system in an unmanaged environment.
Note, that even If it would be possible to "lock" a folder and it's
sub-objects (which isn't), they would also be able to "unlock" as well,
and, what stops them from messing with the file(s) before or after the
program runs.

Willy.

Mar 15 '07 #7
"VJ" <no***********@yahoo.comwrote in message
news:eq**************@TK2MSFTNGP04.phx.gbl...
You are correct, that is why as a last step I came here to see if someone had done it. I
think just legal documents and better log mangment is what is going to keep us going for
now..

VJ

"Willy Denoyette [MVP]" <wi*************@telenet.bewrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>"VJ" <no***********@yahoo.comwrote in message
news:eF**************@TK2MSFTNGP02.phx.gbl...
>>Yes that is what we recomended to our users. But again there are power users or the
computer wizes, who mess with the application' folders and then compalin your app does
not work. The we spend time to see the log and say oh ok you messed with file system.
This again takes time and tricky. Oh well not sure what to do catchy tricky situation.
The problem is this of the shelf product and not a in network entriprise application to
control what you want.

You won't be able to stop those who run as admin or power user and mess with the system
in an unmanaged environment.
Note, that even If it would be possible to "lock" a folder and it's sub-objects (which
isn't), they would also be able to "unlock" as well, and, what stops them from messing
with the file(s) before or after the program runs.

Willy.


Mar 15 '07 #8
zhlsracv itymbflk http://ermkosoi.com nzqvnjnf mhmpalrj <a href="http://obwlwmej.com">jxdijzyz</a>

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
Mar 26 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Programmer | last post by:
Hi everyone Well here is my problem I hope you can help me
1
by: Nand Belani | last post by:
Hi, I have a MS Access 2000 database on the network, it is secured and the mdw file is on the network. The database works for most of the users on the network, but does not open for two of the...
0
by: Andrew Cutforth | last post by:
I have a strange problem that I have not come across before. In a multi user situation I have a readonly query open. When another user tries to post a change to that record it says it is locked....
0
by: Andrew Cutforth | last post by:
I have a strange problem that I have not come across before. In a multi user situation I have a readonly query open. When another user tries to post a change to that record it says it is locked....
1
by: James | last post by:
is there a 3rd party tools or simple batch scripts or VB.NET 2003 to lock files ? Here is the problem 1. i've a config.ini FIXED in a local directory eg c:\configuration. Only this file exist...
4
by: muttu2244 | last post by:
hi all am trying to write some information into the file, which is located in ftp, and this file can be updated by number of people, but if at all i download a file from the ftp to my local...
12
by: Elmo Mäntynen | last post by:
Is there something better than using fnctl? It seems a bit intimidating with a quick look.
4
by: zacks | last post by:
I'm not sure when it came into being, since this it the first time I have worked very much with a password control in .NET, but if a textbox that has a non-empty value for PasswordChar or the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.