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. C#
  4. Folder Protection..

Folder Protection..

Scheduled Pinned Locked Moved C#
questiontutorial
6 Posts 5 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
    kkadir
    wrote on last edited by
    #1

    Hello everyone, My question is simple (-but the answer may not :-D) : is it possible to create folders (and/or files) that only allowed programs can access ? For example; I want to hold some of my audio files in a special folder that only "myAudioPlayer" application can open.. Thanks for your helps and best regards ! Also have nice year !!! :rose:

    .:: Something is Wrong ::.

    L A E 3 Replies Last reply
    0
    • K kkadir

      Hello everyone, My question is simple (-but the answer may not :-D) : is it possible to create folders (and/or files) that only allowed programs can access ? For example; I want to hold some of my audio files in a special folder that only "myAudioPlayer" application can open.. Thanks for your helps and best regards ! Also have nice year !!! :rose:

      .:: Something is Wrong ::.

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      I dont think so... :(

      Luc Pattyn

      1 Reply Last reply
      0
      • K kkadir

        Hello everyone, My question is simple (-but the answer may not :-D) : is it possible to create folders (and/or files) that only allowed programs can access ? For example; I want to hold some of my audio files in a special folder that only "myAudioPlayer" application can open.. Thanks for your helps and best regards ! Also have nice year !!! :rose:

        .:: Something is Wrong ::.

        A Offline
        A Offline
        Ami Bar
        wrote on last edited by
        #3

        The File System is responsible to protect files and folders. The access limitation is defined by account (Windows' users and groups) and permissions (read, write, delete, etc.). You cannot set access permission by application. Not every file system supports file access protection. NTFS supports, FAT doesn't. Ami

        K 1 Reply Last reply
        0
        • A Ami Bar

          The File System is responsible to protect files and folders. The access limitation is defined by account (Windows' users and groups) and permissions (read, write, delete, etc.). You cannot set access permission by application. Not every file system supports file access protection. NTFS supports, FAT doesn't. Ami

          K Offline
          K Offline
          kkadir
          wrote on last edited by
          #4

          For example isn't it possible to set a registry value when you start your app and reset the value when you exit ? And if that registry value is empty the folder may not open ? I am searching for a couple of hours but found nothing :( .. Should I use the WinAPI ? Or the namespace extension, shell etc. ? There must be something, and I am ready to spend my weeks on this topic...:^)

          .:: Something is Wrong ::.

          D 1 Reply Last reply
          0
          • K kkadir

            For example isn't it possible to set a registry value when you start your app and reset the value when you exit ? And if that registry value is empty the folder may not open ? I am searching for a couple of hours but found nothing :( .. Should I use the WinAPI ? Or the namespace extension, shell etc. ? There must be something, and I am ready to spend my weeks on this topic...:^)

            .:: Something is Wrong ::.

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

            pashje wrote:

            isn't it possible to set a registry value when you start your app and reset the value when you exit ? And if that registry value is empty the folder may not open ?

            No, it's not. If your in Explorer or some other app, what's going to check that registry setting to see if it's OK to open the file??? Nothing!! You'd have to write an NTFS extension to implement this kind of functionality, and even then, it's easily defeated because it won't work on a FAT32 volume.

            pashje wrote:

            I am searching for a couple of hours but found nothing

            And you never will find anything, because it's not possible. Well, not without LOTS of extra work.

            pashje wrote:

            There must be something, and I am ready to spend my weeks on this topic...

            Quite wasting your time. This functionality won't exist unless you write an NTFS extension to do it. And even then, it won't work over networked folders.

            Dave Kreskowiak Microsoft MVP - Visual Basic

            1 Reply Last reply
            0
            • K kkadir

              Hello everyone, My question is simple (-but the answer may not :-D) : is it possible to create folders (and/or files) that only allowed programs can access ? For example; I want to hold some of my audio files in a special folder that only "myAudioPlayer" application can open.. Thanks for your helps and best regards ! Also have nice year !!! :rose:

              .:: Something is Wrong ::.

              E Offline
              E Offline
              Ennis Ray Lynch Jr
              wrote on last edited by
              #6

              Create a special user account and restrict access to the file and directories. Then, in your application, you can impersonate. It really won't stop anything but then again, any user with physical access can do anything they want anyway.


              On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage

              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