Archive: Find local user account


Find local user account
  I need to determine whether or not a computer has a local account with a specific name, ie "Manage". Any ideas?


You means computer user with name "Manage"? If YES, have in the HKU key the users available in the computer, so:

EnumRegKey$0 HKU "Manage" "0"

>StrCmp $0 0 NoManage

#Enter the code to run when have a user with the name Manage

>NoManage:
If NO, sorry, I can't help.

Use a plug-in or System.dll to call LookupAccountName.


Thanks for the help. I just ended up doing a net user > c:\user.txt and then parsed through that file to see if the local user existed. Thanks.