if exist %SystemRoot%\System32\pnputil.exe (
set "SystemPath=%SystemRoot%\System32"
) else if exist %SystemRoot%\Sysnative\pnputil.exe (
set "SystemPath=%SystemRoot%\Sysnative"
) else (
echo ERROR: Cannot find pnputil.exe to install the driver.
echo/
pause
goto :EOF
)
%SystemPath%\pnputil.exe -i -a "Kx81_UPD\en\64bit\OEMSETUP.inf"
powershell.exe -command 'Add-PrinterDriver -Name "Kyocera TASKalfa 4052ci KX"'
powershell.exe -command 'Get-PrinterDriver'
powershell.exe -command 'Add-PrinterPort -Name "IP_192.168.X.X" -PrinterHostAddress "192.168.X.X"'
timeout /t 10
powershell.exe -command 'Add-Printer -Name "Printer_Name" -ShareName "Printer_Name" -PortName IP_192.168.X.X -DriverName "Kyocera TASKalfa 4052ci KX"'
powershell.exe -command 'Set-PrintConfiguration -PrinterName "Printer_Nam" -PaperSize A4 -Color $false -DuplexingMode TwoSidedLongEdge'
Install ( Package up drive with Script
Remove-Printer -Name "Printer_name"
Uninstall