最后活跃于 1682603357

修订 c8c67967aeb02a696e28fcef26ee2b490036ff6f

a.bat 原始文件
1echo OFF
2IF NOT "%OS%"=="Windows_NT" GOTO Syntax
3ECHO.%* | FIND "?" >NUL
4IF NOT ERRORLEVEL 1 GOTO Syntax
5IF NOT [%2]==[] GOTO Syntax
6SETLOCAL
7SET WSS=
8IF NOT [%1]==[] FOR /F "tokens = 1 delims = \ " %%A IN ('ECHO.%~1') DO SET WSS = %%A
9FOR /F "tokens = 1 delims = \ " %%a IN ('NET VIEW ^| FIND /I "\\%WSS%"') DO FOR /F
10"tokens = 1 delims = " %%A IN ('NBTSTAT -a %%a ^| FIND /I /V "%%a" ^| FIND "<03>"')
11DO ECHO.%%a %%A
12ENDLOCAL
13GOTO:EOF
14ECHO Display logged on users and their workstations.
15ECHO Usage: ACTUSR [ filter ]
16IF "%OS%"=="Windows_NT" ECHO Where: filter is the first part
17of the computer name^(s^) to be displayed