@echo off
:: logon.cmd
:: simple print install script for xp an 2000
:: only if the printer is not already installed
:: gastone canali
set prnServer=Win2003FS-NJ
set inst_CMD=RUNDLL32.EXE printui.dll,PrintUIEntry /q /u /in /n
call :_PRN_CHK_inst "%prnServer%" "Brother9420"
call :_PRN_CHK_inst "%prnServer%" "HP5850"
call :_PRN_CHK_inst "%prnServer%" "HP2200-Back"
call :_PRN_CHK_inst "%prnServer%" "HP2200-Front"
call :_PRN_CHK_inst "%prnServer%" "HP4240-Inv"
call :_PRN_CHK_inst "%prnServer%" "HP4240-Front"
goto :_END
:_PRN_CHK_inst
echo check for Prn "%~2" on server "%~1"
(reg query "HKCU\Printers\Connections\,,%~1,%~2" /v Server|find /i %1 ) 2>nul 1>nul || (%inst_cmd% "\\%~1\%~2"& echo Install "\\%~1\%~2")
goto :_EOF
:_EOF
:_END
|