How can I lock a file, or a path to a file on a server, from Delphi, so that no user, even the administrator, can get access to the file?
The situation is this: I need to be able to access a file which is hosted on a server from within my Delphi application, but I need to prevent anyone else who might use the computer from reaching that file. In normal operation, my program needs to be able to read this file intermittently, but without letting anyone else, including the current user, be able to read it.
Basically, what I want to do is 'folder locking'... and there are a ton of folder locking programs out there, but I need to be able to lock and unlock from within my own Delphi program. Unless one of these commercial programs has a console or command line access capability, it won't do me any good.
My idea is to write a small Delphi app which runs when the laptop is booted up, and locks the path to the server. Later, when my main program is running, I need to be able to briefly un-lock the path, make my access, and re-lock the path. This way, anyone else, including the user, can't copy the file.
Can anyone help me on this? Any reasonably simple way to lock out a path to a file on a server... or lock just the file itself?
Thanks in advance.