Windows 7中:我怎样才能在.net中的所有Windows用户名的列表?用户名、列表、Windows、net

2023-09-05 23:39:48 作者:犀利姑娘时尚范er

有一个简单的办法让本地的Windows 7计算机使用。NET的所有用户名的名字?所以,如果我有一台机器名为MYPC,它有3个用户MYPC \麦克,MYPC \ Bob和MYPC \史蒂夫,我只是希望能够查询得到迈克,Bob和史蒂夫。当然,我不在乎,如果他们有计算机的名字命名,或不为好。

Is there a simple way to get the names of all the user names of a local Windows 7 machine using .Net? So if I had a machine named MyPC, and it had 3 users MyPC\Mike, MyPC\Bob, and MyPC\Steve, I'd just want to be able to query to get Mike, Bob, and Steve. Of course, I don't care if they have the computer name attached, or not, as well.

推荐答案

HTTP ://www.$c$cproject.com/KB/cs/enumerate_system_users.aspx