B
Barney
I want to produce a list of clients running Windows NT, or
2000 on our network. NET VIEW won't work because all of
the client machines are 'Hidden'.
I want to avoid a static file because that requires
maintenance and does not detect if a computer is actually
running. Therefore, I was thinkning of the following ...
RCMD \\ServerName "NET SESSION" >%Temp%\Sessions.1
FOR /F "Tokens=1-4" %%A IN (%Temp%\Sessions.1) DO
CALL :FindOS %%A %%D
:FindOS
IF {%2} == {NT} ECHO %1 >>%Temp%\Sessions.2
IF {%2} == {2000} ECHO %1 >>%Temp%\Sessions.2
.. . .
but I am stuck here because of an "The syntax of the
command is incorrect" error.
What is wrong with this code?
2000 on our network. NET VIEW won't work because all of
the client machines are 'Hidden'.
I want to avoid a static file because that requires
maintenance and does not detect if a computer is actually
running. Therefore, I was thinkning of the following ...
RCMD \\ServerName "NET SESSION" >%Temp%\Sessions.1
FOR /F "Tokens=1-4" %%A IN (%Temp%\Sessions.1) DO
CALL :FindOS %%A %%D
:FindOS
IF {%2} == {NT} ECHO %1 >>%Temp%\Sessions.2
IF {%2} == {2000} ECHO %1 >>%Temp%\Sessions.2
.. . .
but I am stuck here because of an "The syntax of the
command is incorrect" error.
What is wrong with this code?