Ultima attività 1682603357

thomas ha revisionato questo gist 1682603357. Vai alla revisione

1 file changed, 2 insertions, 2 deletions

a.bat

@@ -1,9 +1,9 @@
1 1 echo OFF
2 2 IF NOT "%OS%"=="Windows_NT" GOTO Syntax
3 - ECHO.%* | FIND "?" >NUL
3 + echo.%* | FIND "?" >NUL
4 4 IF NOT ERRORLEVEL 1 GOTO Syntax
5 5 IF NOT [%2]==[] GOTO Syntax
6 - SETLOCAL
6 + setlocal
7 7 SET WSS=
8 8 IF NOT [%1]==[] FOR /F "tokens = 1 delims = \ " %%A IN ('ECHO.%~1') DO SET WSS = %%A
9 9 FOR /F "tokens = 1 delims = \ " %%a IN ('NET VIEW ^| FIND /I "\\%WSS%"') DO FOR /F

thomas ha revisionato questo gist 1682603348. Vai alla revisione

1 file changed, 1 insertion, 1 deletion

a.bat

@@ -1,4 +1,4 @@
1 - ECHO OFF
1 + echo OFF
2 2 IF NOT "%OS%"=="Windows_NT" GOTO Syntax
3 3 ECHO.%* | FIND "?" >NUL
4 4 IF NOT ERRORLEVEL 1 GOTO Syntax

thomas ha revisionato questo gist 1682549967. Vai alla revisione

1 file changed, 17 insertions

a.bat(file creato)

@@ -0,0 +1,17 @@
1 + ECHO OFF
2 + IF NOT "%OS%"=="Windows_NT" GOTO Syntax
3 + ECHO.%* | FIND "?" >NUL
4 + IF NOT ERRORLEVEL 1 GOTO Syntax
5 + IF NOT [%2]==[] GOTO Syntax
6 + SETLOCAL
7 + SET WSS=
8 + IF NOT [%1]==[] FOR /F "tokens = 1 delims = \ " %%A IN ('ECHO.%~1') DO SET WSS = %%A
9 + FOR /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>"')
11 + DO ECHO.%%a %%A
12 + ENDLOCAL
13 + GOTO:EOF
14 + ECHO Display logged on users and their workstations.
15 + ECHO Usage: ACTUSR [ filter ]
16 + IF "%OS%"=="Windows_NT" ECHO Where: filter is the first part
17 + of the computer name^(s^) to be displayed
Più nuovi Più vecchi