Advertisement
Rick0

DEPLOY_PRINT_LEXMARK

Dec 17th, 2022
1,133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.28 KB | Software | 0 0
  1. @echo off
  2. setlocal EnableDelayedExpansion
  3. ::SCRIPT IMPLANTAÇAO IMPRESSORA DE REDE MONO LEXMARK
  4. ::CRIE UM ARQUIVO COM NOME DAS MAQUINAS.TXT NA PASTA DO SCRIPT
  5. ::COLOQUE O NOME DAS MÁQUINAS NESSE ARQUIVO E RODE O SCRIPT
  6. PUSHD "%dp0%"
  7. SET "IP=IP_IMPRESSORA"
  8. SET "NOMEIP=Lexmark_Empresa_Mono_xx"
  9. ::USERIP (USUARIO DE REDE)
  10. SET "USERIP=xxx"
  11. ::PASSIP (SENHA DE REDE)
  12. SET "PASSIP=xxx"
  13. SET "DIMP=Lexmark Universal V2 XL"
  14. SET "SCIMP=%WINDIR%\System32\Printing_Admin_Scripts\pt-BR"
  15. ::CAMINHO ATALHO SCANNER
  16. ::SET "MSCAN=\\MAQUINA\ATALHO\SCAN\Lexmark Scan Center.lnk"
  17. SET "LOGS=MAQUINAS_LOG.TXT"
  18. for /f "delims=*" %%A in (%~dp0maquinas.txt) do ((ping -n 1 %%A 2>nul | findstr "TTL")&&(TITLE CONFIGURANDO A %%A AGUARDE..
  19. cscript "%SCIMP%\Prnport.vbs" -a -r %IP% -h %IP% -o lpr -q IP -md -s "%%A" -u "%USERIP%" -w "%PASSIP%"
  20. cscript "%SCIMP%\Prnmngr.vbs" -t -a -p "%NOMEIP%" -m "%DIMP%" -r "%IP%" -s "%%A" -u "%USERIP%" -w "%PASSIP%"
  21. cscript "%SCIMP%\Prncnfg.vbs" -t -p "%NOMEIP%" +rawonly +queued -s "%%A" -u "%USERIP%" -w "%PASSIP%"
  22. ::COPIA ATALHO DO SCANNER PARA DESKTOP PUBLICO
  23. ::copy /y "%MSCAN%" "\\%%A\Users\Public\Desktop\Lexmark Scan Center.lnk"
  24. timeout 1
  25. ECHO %%A,OK>>%~dp0%LOGS%!!)||( CONECTANDO A %%A && ECHO FALHA NA CONEXAO %%A & ECHO %%A,FALHA>>%~dp0%LOGS%))
  26. POPD
  27. PAUSE
  28. EXIT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement