Query batch script windows system user list

OFF @echo
echo all users of the machine: >> user.txt
for / F "tokens. 4 = 1-3 = Skip" %% I in ( 'User NET') do (
IF Not "I %%" == "command the successful completion of "%% i echo >> user.txt
IF not" %% J "==" "echo %% J >> user.txt
IF not" %% k "==" "echo %% k >> the User .txt
)
. echo
echo the currently logged in account of this machine is: >> user.txt
echo% username% >> user.txt
Exit> NUL

Guess you like

Origin blog.51cto.com/6300167/2451092