zoukankan      html  css  js  c++  java
  • 批处理自动安装打印机

    @echo off
    title 广州网络打印机自动安装程序         Powered By XXX     Telphone: XXX

    mode con cols=100 lines=20
    color F0
    Echo 正在帮你设置打印机,请稍候……
    net use \\192.168.70.12 /delete
    net use \\192.168.70.12 /user:user user 

    if exist "%windir%/System32/en-US/user32.dll.mui" (goto 12) else (goto 11)

    :
    11
    regedit 
    /s PrintXp.reg   
    net stop spooler
    net start spooler
    rundll32 printui
    .dll,PrintUIEntry /if /"FX DocuCentre 659 CP" /"IP_192.168.70.20" /"FX DocuCentre 659 CP" //"\\192.168.70.12\software\驱动程序\659\FXLOCJI.inf" /q
    rundll32 printui
    .dll,PrintUIEntry //"FX DocuCentre 659 CP" /q
    goto 13

    :
    12
    regedit 
    /s PrintVista.reg
    net stop spooler
    net start spooler
    rundll32 printui
    .dll,PrintUIEntry /if /"FX DocuCentre 659 CP" /"192.168.70.20" /"FX DocuCentre 659 CP" //"\\192.168.70.12\software\驱动程序\fujiPrinter\FXLOCJI.inf"
    rundll32 printui
    .dll,PrintUIEntry //"FX DocuCentre 659 CP" 
    goto 13

    :
    13
    echo.
    echo 打印机安装完成,请测试是否安装成功!
    echo.
    echo 如有问题,请手动连接打印机,具体操作请查看邮件中打印说明文档,谢谢!
    echo.
    pause
    echo.
    exit
     上次忘了提供Printvista.reg和PrintXP.reg的文件,现在补上:
      Printvista.reg ,将下面的文件复制并保存为reg文件。
    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports]
    "StatusUpdateInterval"=dword:0000000a
    "StatusUpdateEnabled"=dword:00000001
    "LprAckTimeout"=dword:000000b4

    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Print\Monitors\Standard TCP/IP Port\Ports\192.168.70.40]
    "Protocol"=dword:00000001
    "Version"=dword:00000002
    "HostName"="192.168.70.40"
    "IPAddress"=""
    "HWAddress"=""
    "PortNumber"=dword:0000238c
    "SNMP Community"="public"
    "SNMP Enabled"=dword:00000000
    "SNMP Index"=dword:00000001
    "PortMonMibPortIndex"=dword:00000000

     PrintXP.reg 保存为REG文件

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports]
    "StatusUpdateInterval"=dword:0000000a
    "StatusUpdateEnabled"=dword:00000001

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\IP_192.168.70.40]
    "Protocol"=dword:00000001
    "Version"=dword:00000001
    "HostName"=""
    "IPAddress"="192.168.70.40"
    "HWAddress"=""
    "PortNumber"=dword:0000238c
    "SNMP Community"="public"
    "SNMP Enabled"=dword:00000000
    "SNMP Index"=dword:00000000

     
    另外,在DOS里面有个命令reg add,也是增加注册表文件,大家可以在命令行模式下输入reg /?来获取更多的信息。

  • 相关阅读:
    剖析 GSM 加密机制以及位置更新的过程
    利用ASK/OOK 发射模块,实现信号重放
    使用RTL-SDR打开车门
    复现 360 Unicorn Team 黑科技之 HackNFC
    如何搭建并使用便携式 4G/LTE 伪基站研究移动安全
    如何利用 LTE/4G 伪基站+GSM 中间人攻击攻破所有短信验证
    黑客炼金术士 Seeker:可以攻破 4G 摸到你短信,还要为朝阳群众提供谍战工具
    如何使用HackRF做一个简单的IMSI捕获器
    招中高级web开发工程师
    ionic 动画和返回按钮
  • 原文地址:https://www.cnblogs.com/fangbo/p/1535849.html
Copyright © 2011-2022 走看看