Question: I am trying (in code) to add a user on a non-domain machine to a computer group I created.

Assume my machine name is MACH01.
When I add the Administrator to it by giving `.\Administrator` or `MACH01\Administrator` (as far as I know, both are same), it succeeds. But since my computer is not in a domain but in the `WORKGROUP` workgroup, I also tried adding it as `WORKGROUP\Adminsitrator`, but it failed saying that such a member does not exist.

Also, in the computer properties I see the `WORKGROUP` workgroup being listed.

So why does the first succeed and second fail, when there is no listing of `MACH01` being a domain or workgroup while `WORKGROUP` is indeed a workgroup. What is the correct domain/workgroup of my computer ?

And does the `.\` notation refer to computername\username or domainname\username ?

Answer: 
A workgroup is not a domain, so there is no such account as WORKGROUP\Administrator.

A domain has accounts and groups network resources in the network explorer, a computer joins it and becomes part of that domain for administration and security. Permission to join the domain is controlled.

A workgroup is merely a grouping in the network explorer. The machines act independantly for security with no shared accounts and no control over which machines can join the workgroup.

Unless it is a domain controller, your computer has its own local accounts too. .\ is shorthand for this.
".\" denotes the local machine. Therefore from what I understand you are after you can simply use this to create the local user.