批处理连接局域网共享打印机,自娱自乐,学习用。
@echo off
COLOR 4e
MODE con: COLS=50 LINES=10
setlocal enabledelayedexpansion
title 共享打印机连接
:main
COLOR 2f
MODE con: COLS=60 LINES=24
cls
echo.
echo.
echo. 请选择需要连接的打印机
echo.
echo 1. \\192.168.1.48\Canon LBP7010C/7018C
echo 2. \\192.168.1.48\Brother DCP-7180DN Printer
echo 3. \\192.168.1.48\Ricoh Aficio MP 2000 PCL
echo.
echo.
set /p choice=. 请按对应数字并回车:
if /i "%choice%"=="1" goto 48_LBP7010C
if /i "%choice%"=="2" goto 48_7180DN
if /i "%choice%"=="3" goto 48_MP2000
cls&set choice=&goto main
:48_LBP7010C
set prntr_info=\\192.168.1.48\Canon LBP7010C/7018C
goto checkcon
:48_7180DN
set prntr_info=\\192.168.1.48\Brother DCP-7180DN Printer
goto checkcon
:48_MP2000
set prntr_info=\\192.168.1.48\Ricoh Aficio MP 2000 PCL
goto checkcon
:checkcon
cls
COLOR 2e
echo.
echo.
echo. 检查中