Jump to content

Raceraut

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Raceraut

  1. Hello! In the Script "_PrintMgr_AddWindowsPrinterConnection" is a Error: Local $oPrinter = $oWMIService("Win32_Printer") Local $oPrinter = $oWMIService^ ERROR Correct: Func _PrintMgr_AddWindowsPrinterConnection($sPrinterPath) Local $oWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") If NOT IsObj($oWMIService) Then Return SetError(1, 0, 0) Local $oPrinter = $oWMIService.get("Win32_Printer") If NOT IsObj($oPrinter) Then Return SetError(1, 0, 0) Local $iRet = $oPrinter.AddPrinterConnection($sPrinterPath) Return ( $iRet = 0 ? 1 : SetError($iRet, 0, 0)) EndFunc ; ==> _PrintMgr_AddWindowsPrinterConnection Sorry for bad english... bg Racer
×
×
  • Create New...