Lock Folder
-
I have an application called "MEDGIDS". In that the main EXE file accessing the folder called "images". I want to lock the "images" folder for the external view(It shouldn't show the files inside the folder). Assume the "images" folder is locked then how can i access the folder from my main EXE file. I need to lock the "images" folder, and if i locked then how to access the "images" folder from main EXE.
Thanks & Regards Kumaran
-
I have an application called "MEDGIDS". In that the main EXE file accessing the folder called "images". I want to lock the "images" folder for the external view(It shouldn't show the files inside the folder). Assume the "images" folder is locked then how can i access the folder from my main EXE file. I need to lock the "images" folder, and if i locked then how to access the "images" folder from main EXE.
Thanks & Regards Kumaran
I would user a DirectoryInfo to change the hidden attribute. I am not aware that you can "lock" a folder, there is only hidden and read only and of course access permiisions controlled by active directories. Attribute changes allow your exe to get at the files and can be done in VB. AD changes are much more stringent.
Never underestimate the power of human stupidity RAH
-
I have an application called "MEDGIDS". In that the main EXE file accessing the folder called "images". I want to lock the "images" folder for the external view(It shouldn't show the files inside the folder). Assume the "images" folder is locked then how can i access the folder from my main EXE file. I need to lock the "images" folder, and if i locked then how to access the "images" folder from main EXE.
Thanks & Regards Kumaran
If you really want to secure your image files, you perhaps should consider storing them in a database like an SQL Server database.
Steve Jowett ------------------------- It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
-
I have an application called "MEDGIDS". In that the main EXE file accessing the folder called "images". I want to lock the "images" folder for the external view(It shouldn't show the files inside the folder). Assume the "images" folder is locked then how can i access the folder from my main EXE file. I need to lock the "images" folder, and if i locked then how to access the "images" folder from main EXE.
Thanks & Regards Kumaran
You cannot "lock" a folder beyond the security provided by NTFS. You also cannot change the security so just an application can get to the folder. This is because when you launch an application, it inherits the security token of the user that launched it. In other words, the application is impersonating the user and has the same security permissions that the user does. So, if you change the security so a person cannot see what's inside the folder, your application won't be able to see it either.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007