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 / C++ / MFC
  4. How to get specified windows users or group?

How to get specified windows users or group?

Scheduled Pinned Locked Moved C / C++ / MFC
comtutorialquestion
7 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.
  • S Offline
    S Offline
    Syouki_kou
    wrote on last edited by
    #1

    I reference this Using the Windows 2000/XP Object Selection Dialog[^]. It's great article, but what i need is to get specified user list or group, such as "administrators" group, and all users in this groups, what should i set with the filter? Say: 1. "administrators" group 2. users in "administrators" group 3. "users" group 4. users in "users" group In a word, my purpose is to get only 1&&2&&3&&4, NOT all the users and groups in local PC, what should i do set with the filter?

    One day a pretty girl asked me:"Do u think you are handsome?" "I don't think so!".She gave a slap in my face:"Why lying?"...

    S D K 3 Replies Last reply
    0
    • S Syouki_kou

      I reference this Using the Windows 2000/XP Object Selection Dialog[^]. It's great article, but what i need is to get specified user list or group, such as "administrators" group, and all users in this groups, what should i set with the filter? Say: 1. "administrators" group 2. users in "administrators" group 3. "users" group 4. users in "users" group In a word, my purpose is to get only 1&&2&&3&&4, NOT all the users and groups in local PC, what should i do set with the filter?

      One day a pretty girl asked me:"Do u think you are handsome?" "I don't think so!".She gave a slap in my face:"Why lying?"...

      S Offline
      S Offline
      Shivanand Gupta
      wrote on last edited by
      #2

      i am not clearing with your question. are you want current user or all details of user.

      S 1 Reply Last reply
      0
      • S Shivanand Gupta

        i am not clearing with your question. are you want current user or all details of user.

        S Offline
        S Offline
        Syouki_kou
        wrote on last edited by
        #3

        yes, i only want to get all user name in a specified group. Say, user1, user2 are both administrator on local PC, i want to get their names and save the strings into a list. So do "users" group.

        One day a pretty girl asked me:"Do u think you are handsome?" "I don't think so!".She gave a slap in my face:"Why lying?"...

        1 Reply Last reply
        0
        • S Syouki_kou

          I reference this Using the Windows 2000/XP Object Selection Dialog[^]. It's great article, but what i need is to get specified user list or group, such as "administrators" group, and all users in this groups, what should i set with the filter? Say: 1. "administrators" group 2. users in "administrators" group 3. "users" group 4. users in "users" group In a word, my purpose is to get only 1&&2&&3&&4, NOT all the users and groups in local PC, what should i do set with the filter?

          One day a pretty girl asked me:"Do u think you are handsome?" "I don't think so!".She gave a slap in my face:"Why lying?"...

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Syouki_kou wrote:

          but what i need is to get specified user list or group, such as "administrators" group, and all users in this groups, what should i set with the filter?

          Have you tried NetGroupGetUsers() and/or NetLocalGroupGetMembers()?

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "Man who follows car will be exhausted." - Confucius

          S 1 Reply Last reply
          0
          • S Syouki_kou

            I reference this Using the Windows 2000/XP Object Selection Dialog[^]. It's great article, but what i need is to get specified user list or group, such as "administrators" group, and all users in this groups, what should i set with the filter? Say: 1. "administrators" group 2. users in "administrators" group 3. "users" group 4. users in "users" group In a word, my purpose is to get only 1&&2&&3&&4, NOT all the users and groups in local PC, what should i do set with the filter?

            One day a pretty girl asked me:"Do u think you are handsome?" "I don't think so!".She gave a slap in my face:"Why lying?"...

            K Offline
            K Offline
            KarstenK
            wrote on last edited by
            #5

            you should filter the needed persons out of the list.

            Press F1 for help or google it. Greetings from Germany

            S 1 Reply Last reply
            0
            • D David Crow

              Syouki_kou wrote:

              but what i need is to get specified user list or group, such as "administrators" group, and all users in this groups, what should i set with the filter?

              Have you tried NetGroupGetUsers() and/or NetLocalGroupGetMembers()?

              "One man's wage rise is another man's price increase." - Harold Wilson

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              "Man who follows car will be exhausted." - Confucius

              S Offline
              S Offline
              Syouki_kou
              wrote on last edited by
              #6

              Thank you for your reply, i know the two API. But i still want to use the system pick up dialog to finish my work. I just have no idea for set the filter.

              One day a pretty girl asked me:"Do u think you are handsome?" "I don't think so!".She gave a slap in my face:"Why lying?"...

              1 Reply Last reply
              0
              • K KarstenK

                you should filter the needed persons out of the list.

                Press F1 for help or google it. Greetings from Germany

                S Offline
                S Offline
                Syouki_kou
                wrote on last edited by
                #7

                I don't know what the needed persons are, the user press a button on my application will invoke the pick up dialog. My purpose is, no matter what operation user do on the dialog, it will only return "administrators" or "users".

                One day a pretty girl asked me:"Do u think you are handsome?" "I don't think so!".She gave a slap in my face:"Why lying?"...

                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