|
|
|||||||
helloe all, i'm new to kixtart, so i'll post my question here... first of all kixtart rock's like hell!!! so now to my question, is it possibel to get a list of all 'local user profiles'(sorry for my bad english) that are located/installed on a client machine??? how would u code that?? is there a macro or something? any help would be appreciated thx i <3 kixtart |
||||||||
|
|
|||||||
You can find it in the reg. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList |
||||||||
|
|
|||||||
cool man!!! thats great! hmm.. i'm relativly new to windows OS, how can i learn more about the registry? ^i'll try that now... |
||||||||
|
|
|||||||
hmm.. ok. i had a look in the registry... under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList there are alot strange numbers (hrm. i guess kind of sid or so...) i'd like to just extrackt the userid or the name of the users that have a local profile... how do i work myselfe through al the folders under: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList ???? i have no clue... thank u in advance |
||||||||
|
|
|||||||
with enumkey and some looping. but, you won't get no userID or username from there. you will only get the profile folder (which is some sorta construct of the userID though) |
||||||||
|
|
|||||||
Once you enumerate the keys (sids) under ProfileList, pass them to SidToName() for a translation to domain\user format. |
||||||||
|
|
|||||||
You could also try running something like this to see all the names of the profiles. |
||||||||
|
|
|||||||
That is just a list of folders. Not necessarily proper profiles as per what is listed in the reg. |
||||||||
|
|
|||||||
hmm... the sidtoname sounds actually the simpliest way to go... |
||||||||
|
|
|||||||
True, but sort of depends on what you want the information for I suppose. I've seen folders there that are not in the registry too (probably due to some tech messing with it, or poorly behaved app) |
||||||||
|
|
|||||||
or just simply broken profile or reinstalled windows or... if it's not in the registry, it does not matter to windows as it is not a profile dir. on the other hand, it can have some personal information in it. for data retrieval purposes, those folders may hold some meaning. |
||||||||
|
|
|||||||
Okay, round 2. Is this better? |
||||||||
|
|
|||||||
Doc, did you test that? All you need to do is take the text Sid (name of profilelist subney) and pass that to SidToNAme(). [edit] After a re-read, it looks good. [/edit] |
||||||||
|
|
|||||||
Yes I tested it. The SID that it returns from the REG is some other format and NOT the SID required to show it from KiXtart conversion. I just wanted to go ahead and display that too, but I suppose it could be confusing as it's not the same. It returns 3 formats. Like this... Code: Registry Account Name: LocalService Did YOU run it Give it a try and you should see it works just fine. |
||||||||
|
|
|||||||
Yeah, that sid is in Hex format. |
||||||||
|
|
|||||||
Okay, updated the code above a little. Here is sample output. Code: SID2Name: LOCAL SERVICE |
||||||||
|
|
|||||||
what does "registry account name" mean? |
||||||||
|
|
|||||||
Well if we look at the code we see that it reads this from the registry ProfileImagePath which typically is just the FOLDER name. SidToName on the otherhand also gives the Domain the account comes from. JOHNDOE vs. SOMEDOMAIN\JOHNDOE |
||||||||
|
|
|||||||
but... looking at the code, it would not always return "JOHNDOE" sometimes it will also return "JOHNDOE.SOMEDOMAIN" or "JOHNDOE.SOMEDO~1" or something alike. |
||||||||
|
|
|||||||
Only if it's in the Registry which would be a VALID profile whether or not it was from corruption or whatever. Not sure what your point is Jooel. This is just an exercise in showing various ways of getting the data requested. I don't see any "specifics" of include/exclude requirements, or even a reply since I posted this code except from us regulars. If / When such stringent requirements are provided then he can hopefully have at least an idea of how to constrain the data to his requirements, which is better than just generalizations on how to do it. |