Thread: UserMgr Plugin
View Single Post
Old 1st September 2011, 21:40   #45
Junior Member
Join Date: May 2006
Posts: 17
Re: GetCurrentUserName/Domain, these are identical:

PHP Code:
UserMgr::GetUserNameFromSID "S-1-5-21-4264112824-276356272-3790957511-1754"
Pop $0
MessageBox MB_OK 
"$0 vs $1\$2" 
The net user command tells somewhat of a different tale -- it appends ".com" onto the domain when it describes the request.

Going back and changing the code above to\username, still gets me the error, BUT calling GetSIDFromUsername with and my username, yields the correct SID.

What do you make of this?

C:\Users\oliverlw>net user oliverlw /domain
The request will be processed at a domain controller for domain

User name xxxx
Full Name xxxx xxxx
User's comment
Country code 000 (System Default)
Account active Yes
Account expires Never

Password last set 8/5/2011 7:56:20 AM
Password expires 11/3/2011 7:56:20 AM
Password changeable 8/6/2011 7:56:20 AM
Password required Yes
User may change password Yes

Workstations allowed All
Logon script
User profile
Home directory
Last logon 9/1/2011 3:28:51 PM

Logon hours allowed All

Local Group Memberships
Global Group memberships *xxxx

The command completed successfully.
langdon is offline   Reply With Quote