(view source code of manage.bat as plain text)
@ECHO OFF
:: Check for correct Windows version
IF NOT "%OS%"=="Windows_NT" GOTO Syntax
VER | FIND.EXE "Windows NT" >NUL && GOTO Syntax
:: Check for correct number of command line arguments
IF "%~1"=="" GOTO Syntax
IF NOT "%~2"=="" GOTO Syntax
:: Check validity of command line argument
ECHO.%1 | FINDSTR.EXE /R /C:"[\\/?]" >NUL && GOTO Syntax
PING.EXE %~1 -n 2 2>NUL | FIND.EXE "TTL=" >NUL || GOTO Syntax
:: The actual command
START %windir%\System32\COMPMGMT.MSC /COMPUTER=\\%~1
:: Done, exit with last errorlevel
EXIT /B %ERRORLEVEL%
:Syntax
ECHO.
ECHO Manage.bat, Version 1.00 for Windows 2000 and later
ECHO Open a Computer Management Console for the specified remote computer.
ECHO.
ECHO Usage: MANAGE remote_computer_name
ECHO.
ECHO Where: "remote_computer_name" is the computer to be managed
ECHO.
ECHO Written by Rob van der Woude
ECHO http://www.robvanderwoude.com
EXIT /B 1
page last modified: 2024-04-16; loaded in 0.0081 seconds