123,我来回报社会
456,路过Run(@ComSpec & " /c " & 'rundll32 printui.dll,PrintUIEntry /in /u /z /q /n "\\IT\FX DocuPrint 2108 b"', "", @SW_HIDE)
$whnd1=WinWait("连接到打印机")
WinActivate($whnd1)
ControlClick($whnd1, "是(&Y)", "Button1")
$HP_1020_1 = "正在连接到 IT 上 的 FX DocuPrint 2108 b"
While 1
If Not WinExists($HP_1020_1) Then
Sleep(1000)
ExitLoop
EndIf
WEnd
Sleep(500)
MsgBox(0, 0, "打印机安装成功", 2)
$hp2108b1=MsgBox(4,"提示","是否把FX DocuPrint 2108 b设为默认打印机?")
If $hp2108b1=6 Then
Run(@ComSpec & " /c " & 'rundll32 printui.dll,PrintUIEntry /y /n "\\IT\FX DocuPrint 2108 b" ', "", @SW_HIDE)
Sleep(3000)
MsgBox(0, 0, "FX DocuPrint 2108 b已设为默认打印机", 3)
EndIf
|