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. [Message Deleted]

[Message Deleted]

Scheduled Pinned Locked Moved Visual Basic
19 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.
  • H hitesh sojitra

    If i set individual permission instead of FullControl than it possible to enable by .Allow option ?

    Hitesh sojitra

    C Offline
    C Offline
    Christian Graus
    wrote on last edited by
    #10

    I guess try it and see.

    Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

    H 1 Reply Last reply
    0
    • C Christian Graus

      I guess try it and see.

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      H Offline
      H Offline
      hitesh sojitra
      wrote on last edited by
      #11

      i tried but not a single permission could be enabled by .Allow Option

      Hitesh sojitra

      D 1 Reply Last reply
      0
      • H hitesh sojitra

        i tried but not a single permission could be enabled by .Allow Option

        Hitesh sojitra

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

        You're OBVIOUSLY going to have to use an admin account to grant the permissions back to that user. Then you can go back as that user and try your code again. Please tell me you know how permissions and Windows Security works before you attempt to write code that manipulates it?? BTW: What you're doing is a complete waste of time. You're really not proecting anything by allowing the user to manipulate access rights. There is absolutely nothing stopping the user from resetting the permissions directly on these files/folders from Explorer. Please keep in mind that any code a user launches runs AS the user. There is no special permissions that code gets over and above the permissions the user has who launched it.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008

        H 1 Reply Last reply
        0
        • D Dave Kreskowiak

          You're OBVIOUSLY going to have to use an admin account to grant the permissions back to that user. Then you can go back as that user and try your code again. Please tell me you know how permissions and Windows Security works before you attempt to write code that manipulates it?? BTW: What you're doing is a complete waste of time. You're really not proecting anything by allowing the user to manipulate access rights. There is absolutely nothing stopping the user from resetting the permissions directly on these files/folders from Explorer. Please keep in mind that any code a user launches runs AS the user. There is no special permissions that code gets over and above the permissions the user has who launched it.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008

          H Offline
          H Offline
          hitesh sojitra
          wrote on last edited by
          #13

          [Message Deleted]

          H D 2 Replies Last reply
          0
          • H hitesh sojitra

            [Message Deleted]

            H Offline
            H Offline
            hitesh sojitra
            wrote on last edited by
            #14

            first i m using this code to Deny permission dSecurity.AddAccessRule(New Security.AccessControl.FileSystemAccessRule("cybergindia\hitesh", FileSystemRights.Write, AccessControlType.Deny)) AND To enable it i Use this code dSecurity.AddAccessRule(New Security.AccessControl.FileSystemAccessRule("cybergindia\hitesh", FileSystemRights.Write, AccessControlType.Allow)) is it right way ?

            Hitesh sojitra

            H 1 Reply Last reply
            0
            • H hitesh sojitra

              [Message Deleted]

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

              hitesh sojitra wrote:

              but i don't know in much detail how windows security works ? he

              Sorry, this is a topic that is so large, it's covered by entire books. A few forum posts is not going to cover it. Click[^]

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007, 2008

              1 Reply Last reply
              0
              • H hitesh sojitra

                first i m using this code to Deny permission dSecurity.AddAccessRule(New Security.AccessControl.FileSystemAccessRule("cybergindia\hitesh", FileSystemRights.Write, AccessControlType.Deny)) AND To enable it i Use this code dSecurity.AddAccessRule(New Security.AccessControl.FileSystemAccessRule("cybergindia\hitesh", FileSystemRights.Write, AccessControlType.Allow)) is it right way ?

                Hitesh sojitra

                H Offline
                H Offline
                hitesh sojitra
                wrote on last edited by
                #16

                ok So sir just you guide me how to enable individual permission of folder/file

                Hitesh sojitra

                D 1 Reply Last reply
                0
                • H hitesh sojitra

                  ok So sir just you guide me how to enable individual permission of folder/file

                  Hitesh sojitra

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

                  You're already doing it the correct way. It's your lack of understanding about how permissions work that's going against you.

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                       2006, 2007, 2008

                  H 1 Reply Last reply
                  0
                  • H hitesh sojitra

                    Thanks it works... :) Is there any API for retriving domainname/user. :)

                    Hitesh sojitra

                    J Offline
                    J Offline
                    John_Adams
                    wrote on last edited by
                    #18

                    Hi Hitesh, It is good to hear that my response was helpful. Well, I am not aware of any such API's however, you may try to explore the System.Security namespace for more feature and functionality. Hope this helps.

                    Regards, John Adams ComponentOne LLC

                    1 Reply Last reply
                    0
                    • D Dave Kreskowiak

                      You're already doing it the correct way. It's your lack of understanding about how permissions work that's going against you.

                      A guide to posting questions on CodeProject[^]
                      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                           2006, 2007, 2008

                      H Offline
                      H Offline
                      hitesh sojitra
                      wrote on last edited by
                      #19

                      ok Thank for help will try and let u know again ......

                      Hitesh sojitra

                      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