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 can i enumerate all users in PC?

How can i enumerate all users in PC?

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 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.
  • F Offline
    F Offline
    fcoder
    wrote on last edited by
    #1

    I need to delete application files producing when user use my App in the uninstalling process.How can i know all users' account in order to delete files in Document Setting(Win2k). Thanks

    A H J 4 Replies Last reply
    0
    • F fcoder

      I need to delete application files producing when user use my App in the uninstalling process.How can i know all users' account in order to delete files in Document Setting(Win2k). Thanks

      A Offline
      A Offline
      Anton Mikhalyov
      wrote on last edited by
      #2

      NetUserEnum The NetUserEnum function provides information about all user accounts on a server.

      1 Reply Last reply
      0
      • F fcoder

        I need to delete application files producing when user use my App in the uninstalling process.How can i know all users' account in order to delete files in Document Setting(Win2k). Thanks

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        Hi fcoder, I think http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ad/ad/enumerating_users.asp[^] is helpful for you

        1 Reply Last reply
        0
        • F fcoder

          I need to delete application files producing when user use my App in the uninstalling process.How can i know all users' account in order to delete files in Document Setting(Win2k). Thanks

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          PUSER_INFO_3 users; LPWSTR lp1; DWORD d1,d2; DWORD SizeName=sizeof(Name); GetComputerName(Name,&SizeName); lp1=A2W (Name); NetApiBufferAllocate(1024,(LPVOID*)&users); NetUserEnum(lp1,3,FILTER_NORMAL_ACCOUNT,(LPBYTE*)&users,MAX_PREFERRED_LENGTH, &d1,&d1,NULL ); and also use USES_CONVERSION; in the first code I hope helpful for you

          1 Reply Last reply
          0
          • F fcoder

            I need to delete application files producing when user use my App in the uninstalling process.How can i know all users' account in order to delete files in Document Setting(Win2k). Thanks

            J Offline
            J Offline
            John R Shaw
            wrote on last edited by
            #5

            You need to reword this. I am amazed I understood what I did. INTP Every thing is relative...

            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