Printer Connection Wizard

Source: Internet
Author: User

Printer Connection Wizard, which automatically identifies the simplified Chinese system and then selects the prompt voice.

Connect using the current user first, if not the intranet user, the connection cannot be established, then the printer operator account will be used to connect.

@echo off
Ver |findstr version
If%errorlevel%==0 (goto cnstart) Else GOTO Enstart

: Cnstart
Cls
Echo Printer Add Wizard
Echo.
ECHO is preparing the printer list, please wait ...
Ping-n 3 127.0.0.1 >nul
Cls
Echo.
echo = = Packing section ============================
echo [1] HP Laser Jet 1320 on Liaomingfang
echo [2] HP Laser Jet 1320 on Limei
Echo.
echo = = Office Building print Server ==================
echo [4] HP Laser Jet 2420 on LNTFBDC01
echo [5] HP Laser Jet 2420 (2) on LNTFBDC01
echo [6] Sharp ar316l [A3 printer] on LNTFBDC01
echo [7] Epson LQ 1900 [pin printer] on LNTFBDC01
echo [8] Epson LQ 1600 [pin printer] on LNTFBDC01
Echo.
echo = = hr ============================
echo [9] HP Laser Jet 1010 on Liaowen
Echo.
echo = = Production Department ============================
echo [one] HP Laser Jet 1320 on tangping
Echo.
echo = = Finance Dept. ============================
echo [+] HP Laser Jet 1020 on yefengling
echo [+] EPSON LQ 680 [PIN printer] on Huangmei
Echo.
echo = = Customs Department ============================
echo [680] Epson LQ [PIN printer] on Wanglixia
Echo.
set/p number= Enter the printer you need to connect to [serial number] and enter:
For%%f in (1,2,5,6,7,8,9,11,13,14,15) do if%number% = =%%f Goto case%%f
Echo.
echo input error, the wizard is about to exit ...
GOTO END

: CASE1
Set IP=LN-SHP-LIAOMF
Set Printer=hplaserj
GOTO CNN

: CASE2
Set Ip=ln-shp-lim
Set Printer=hplaserj
GOTO CNN

: CASE4
Set IP=LNTFBDC01
Set printer=hplaserj2420
GOTO CNN

: CASE5
Set IP=LNTFBDC01
Set Printer=hplaserj2420_2
GOTO CNN

: CASE6
Set IP=LNTFBDC01
Set printer=sharpar-316l
GOTO CNN

: CASE7
Set IP=LNTFBDC01
Set printer=epsonlq-1900
GOTO CNN

: CASE8
Set IP=LNTFBDC01
Set printer=epsonlq-1600
GOTO CNN

: CASE9
Set Ip=ln-hr-liaowen
Set PRINTER=HP Laser Jet 1010
GOTO CNN

: CASE11
Set ip=ln-prd-tangping
Set Printer=hplaserj
GOTO CNN

: CASE13
Set IP=LN-ACC-YEFL
Set printer=hplaserj1020
GOTO CNN

: CASE14
Set IP=LN-ACC-HUANGM
Set printer=lq680k
GOTO CNN

: CASE15
Set Ip=ln-cus-wanglix
Set printer=epsonlq-
GOTO CNN

: CNN
Echo.
echo You are an extranet user, please press any key to continue to connect the printer ...
NET use \\%ip% >nul 2>nul
If%errorlevel% = = 0 GOTO Cnnok
NET use \\%ip% "p-123456"/user: "LN-TF\LNP"
: Cnnok
Cls
Echo.
Echo.
echo you selected the [%number%] printer, connecting ...
rundll32 printui.dll,printuientry/in/n "\\%ip%\%printer%"
Echo.
Echo.
echo Printer \\%ip%\%printer% is connected, please set it as your default printer.
GOTO End
: Enstart
Cls
echo Long Nan topform Printer Connection Guide
Echo.
echo Preparing Printers List, plase wait ...
Ping-n 3 127.0.0.1 >nul
Cls
Echo.
Echo ==shipping Dept. ============================
echo [1] HP Laser Jet 1320 at Liaomingfang
echo [2] HP Laser Jet 1320 at Limei
Echo.
echo ==office Print Server ==================
echo [4] HP Laser Jet 2420 at LNTFBDC01
echo [5] HP Laser Jet 2420 (2) at LNTFBDC01
echo [6] sharp ar316l [A3 Printer] at LNTFBDC01
echo [7] Epson LQ 1900 [Stylus Printer] at LNTFBDC01
echo [8] Epson LQ [Stylus Printer] at LNTFBDC01
Echo.
echo ==human Resources Dept. ============================
echo [9] HP Laser Jet 1010 at Liaowen
Echo.
echo ==production Control Dept. ============================
echo [one] HP Laser Jet 1320 at tangping
Echo.
Echo ==account Dept. ============================
echo [HP] Laser Jet 1020 at yefengling
echo [+] Epson LQ 680 [Stylus Printer] at Huangmei
Echo.
Echo ==customs Dept. ============================
echo [+] Epson LQ 680 [Stylus Printer] at Wanglixia
Echo.
set/p number=input prefix number of printer you want connect and then press ENTER:
For%%f in (1,2,5,6,7,8,9,11,13,14,15) do if%number% = =%%f Goto case%%f
Echo.
echo Input error, guide exiting ...
GOTO END

: CASE1
Set IP=LN-SHP-LIAOMF
Set Printer=hplaserj
GOTO CNN

: CASE2
Set Ip=ln-shp-lim
Set Printer=hplaserj
GOTO CNN

: CASE4
Set IP=LNTFBDC01
Set printer=hplaserj2420
GOTO CNN

: CASE5
Set IP=LNTFBDC01
Set Printer=hplaserj2420_2
GOTO CNN

: CASE6
Set IP=LNTFBDC01
Set printer=sharpar-316l
GOTO CNN

: CASE7
Set IP=LNTFBDC01
Set printer=epsonlq-1900
GOTO CNN

: CASE8
Set IP=LNTFBDC01
Set printer=epsonlq-1600
GOTO CNN

: CASE9
Set Ip=ln-hr-liaowen
Set PRINTER=HP Laser Jet 1010
GOTO CNN

: CASE11
Set ip=ln-prd-tangping
Set Printer=hplaserj
GOTO CNN

: CASE13
Set IP=LN-ACC-YEFL
Set printer=hplaserj1020
GOTO CNN

: CASE14
Set IP=LN-ACC-HUANGM
Set printer=lq680k
GOTO CNN

: CASE15
Set Ip=ln-cus-wanglix
Set printer=epsonlq-
GOTO CNN

: CNN
Echo.
echo You is not an intranet User,please press any key to continue ...
NET use \\%ip% >nul 2>nul
If%errorlevel% = = 0 GOTO Cnnok
NET use \\%ip% "p-123456"/user: "LN-TF\LNP"
: Cnnok
Cls
Echo.
Echo.
echo you select [%number%] printer,connectting ...
rundll32 printui.dll,printuientry/in/n "\\%ip%\%printer%"
Echo.
Echo.
echo Printer%printer% have Connected,set as default Printer by yourself.


: END
Ping-n 4 127.0.0.1 >nul
Del%0
Exit

Printer Connection Wizard

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.