Последняя активность 1682603357

Версия 35f868f51a4af8bfbd2b81486481dcd39a3d1fb8

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