Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Lock Folder

Lock Folder

Scheduled Pinned Locked Moved Visual Basic
tutorialquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kumaran21cen
    wrote on last edited by
    #1

    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

    M S D 3 Replies Last reply
    0
    • K Kumaran21cen

      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

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • K Kumaran21cen

        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

        S Offline
        S Offline
        Steven J Jowett
        wrote on last edited by
        #3

        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)

        1 Reply Last reply
        0
        • K Kumaran21cen

          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

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups