Prevent user from deleting/moving files
-
Hello all, I'm writing an application where I need to prevent users from deleting/moving/... files on my hard-disk. The only thing I found out is that you can do that for whole folders by use of ICopyHook. But are there other solutions, especially for single files, too? Thanks, Schlaubi
For single files you could set its attribute to write-protected. That would be the nicest way, because the user can still choose if he absolutely wants to delete the file. However if you want to prevent the user from deleting/moving it during runtime, you could just open the file. The OS would not allow opened files to be deleted/moved.
-
For single files you could set its attribute to write-protected. That would be the nicest way, because the user can still choose if he absolutely wants to delete the file. However if you want to prevent the user from deleting/moving it during runtime, you could just open the file. The OS would not allow opened files to be deleted/moved.
-
Thanks for your hints, but I need to prevent the user form deleting any file on my disk. So both your solution will not work for me. Thanks anyway!
Are you trying to build an anti-virus tool? :) I don't think that is possible... Rickard Andersson@Suza Computing C# and C++ programmer from SWEDEN! UIN: 50302279 E-Mail: nikado@pc.nu Speciality: I love C#, ASP.NET and C++!
-
Are you trying to build an anti-virus tool? :) I don't think that is possible... Rickard Andersson@Suza Computing C# and C++ programmer from SWEDEN! UIN: 50302279 E-Mail: nikado@pc.nu Speciality: I love C#, ASP.NET and C++!
Are you trying to build an anti-virus tool? How did you come accross that idea? Do you write a virus and fear my tool?;) No, in fact i wrote a "secure" browser for some kind of information terminals. And some kids tried (and even got it out:(() how to delete files. That was the point I started to think about kind of forbid-to-delete-tool.
-
Hello all, I'm writing an application where I need to prevent users from deleting/moving/... files on my hard-disk. The only thing I found out is that you can do that for whole folders by use of ICopyHook. But are there other solutions, especially for single files, too? Thanks, Schlaubi
Maybe you can use File system access rights? This would work under NT, 2K and XP prof. The outdated(W95 to ME) and crippleware (XP Home) versions are out of the question, though.
My opinions may have changed, but not the fact that I am right.
-
Hello all, I'm writing an application where I need to prevent users from deleting/moving/... files on my hard-disk. The only thing I found out is that you can do that for whole folders by use of ICopyHook. But are there other solutions, especially for single files, too? Thanks, Schlaubi
-
Seems like I've to add another line.:-D I dont wanna play with access rights and that stuff - my goal is to prevent deleting only during runtime, not during the whole windows session. But thanks for your hints anyway:):)
Schlaubi wrote: I dont wanna play with access rights and that stuff - my goal is to prevent deleting only during runtime, not during the whole windows session. I do not think that I would
want
that to be possible - at least not with one of the "real" Windows versions. But I fear there could be some hook to do that.:(
My opinions may have changed, but not the fact that I am right.
-
Schlaubi wrote: I dont wanna play with access rights and that stuff - my goal is to prevent deleting only during runtime, not during the whole windows session. I do not think that I would
want
that to be possible - at least not with one of the "real" Windows versions. But I fear there could be some hook to do that.:(
My opinions may have changed, but not the fact that I am right.
jhwurmbach wrote: I do not think that I would want that to be possible - at least not with one of the "real" Windows versions. Your opinion is not that wrong - under usual circumstances I would not want to have that, too. But in my special case I need it - for public information terminals available for everyone, also little hacker kids trying everything to get the system crashed.:)
-
jhwurmbach wrote: I do not think that I would want that to be possible - at least not with one of the "real" Windows versions. Your opinion is not that wrong - under usual circumstances I would not want to have that, too. But in my special case I need it - for public information terminals available for everyone, also little hacker kids trying everything to get the system crashed.:)
Well, but then you only have ONE application running all day, and probably not IE6 with its deep OS integration. Do not allow anyone to start any application, prevent your browser from calling a shell and no one will be able to delete a file.
My opinions may have changed, but not the fact that I am right.
-
Well, but then you only have ONE application running all day, and probably not IE6 with its deep OS integration. Do not allow anyone to start any application, prevent your browser from calling a shell and no one will be able to delete a file.
My opinions may have changed, but not the fact that I am right.