Naposledy aktivní 1682603357

a.bat Raw
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