#211995 - 2016-10-05 09:31 PM
The specified port is unknown? - AddPrinter() UDF
|
TJahones
Fresh Scripter
Registered: 2016-10-05
Posts: 5
Loc: Canada
|
Hey all,
Long time listener, first time caller...
I am using the UDF AddPrinter() but when the script runs it seems to fail at the printer driver section? At least I think it does...
I receive a windows error "The Specified Port is Unknown"
Has anyone run into this before with the AddPrinter UDF? I tried searching the forums but didn't find anyone else with the same issue.
We're trying to eliminate print servers in our environment and add the printers by IP instead.
Any ideas?
Thanks in advance!
|
|
Top
|
|
|
|
#211999 - 2016-10-05 10:53 PM
Re: The specified port is unknown? - AddPrinter() UDF
[Re: Allen]
|
TJahones
Fresh Scripter
Registered: 2016-10-05
Posts: 5
Loc: Canada
|
Hey Allen,
Thanks again for your time.
Windows 7 Pro 64 - Bit. Windows Server 2012 R2.
KIX: 4.53
Ricoh MPC 5503 printer.
Here is the snippet of code (I was trying locally as I thought maybe it was an access permissions issue before):
ADDPRINTER("10.8.8.22","PCL6 Driver for Universal Print","C:\Users\tjones\Downloads\z76358L17\64bit\oemsetup.inf","Ricoh 5503 LAB")
? "Trying to add by IP... "@error
Here is the OEMsetup.inf file I was trying to reference (I assumed printername would be DRVName but maybe this is where my issue lies?):
;------------------------------------------------------------ ; Copyright (c) 2007-2016 RICOH COMPANY, LTD ; All Rights Reserved ; Printer Driver Setup Information File ;------------------------------------------------------------
[Version] Signature = "$Windows NT$" Provider = %Ricoh% ClassGUID = {4D36E979-E325-11CE-BFC1-08002BE10318} Class = Printer DriverVer = 05/16/2016,4.10.0.0 DriverIsolation = 2
CatalogFile = ricu0a.cat
[Manufacturer] %Ricoh%=Ricoh,NTamd64,NT.5.1
;WindowsXP(amd64) [Ricoh.NTamd64] %DrvName% = PrinterModel64.dat,USBPRINT\RICOHMP_2001360F,LPTENUM\RICOHMP_2001360F,RICOHMP_2001360F %CoDrvName% = PrinterModel64_ver.dat,USBPRINT\RICOHPCL6DriveforUP,LPTENUM\RICOHPCL6DriveforUP,RICOHPCL6DriveforUP
;WindowsXP(x86) [Ricoh.NT.5.1] %DrvName% = PrinterModel64.dat,USBPRINT\RICOHMP_2001360F,LPTENUM\RICOHMP_2001360F,RICOHMP_2001360F %CoDrvName% = PrinterModel64_ver.dat,USBPRINT\RICOHPCL6DriveforUP,LPTENUM\RICOHPCL6DriveforUP,RICOHPCL6DriveforUP
[PrinterModel64.dat] CopyFiles = RPD_FILES,RPD_COMMON,RPD_COMMON_SYS32,@copcl6ud.txt DataSection = RPD_DATA DataFile = ricu0acd.psz LanguageMonitor = ricu0alm,ricu0alm.dll
[PrinterModel64_ver.dat] CopyFiles = RPD_FILES,RPD_COMMON,RPD_COMMON_SYS32 DataSection = RPD_DATA DataFile = ricu0acd.psz LanguageMonitor = ricu0alm,ricu0alm.dll
[RPD_FILES] ricu0aui.dll,ricu0aui.dl_ ricu0aui.irj ricu0aui.rdj ricu0aui.rcf ricu0aug.dll,ricu0aug.dl_ ricu0aug.miz ricu0aur.dll,ricu0aur.dl_ ricu0agr.dll,ricu0agr.dl_ ricu0agl.dll,ricu0agl.dl_ ricu0aci.dll,ricu0aci.dl_ ricu0acd.dll,ricu0acd.dl_ ricu0acd.psz ricu0acf.cfz ricu0acl.ini ricu0ach.chm ricu0acz.dlz ricu0acj.dll,ricu0acj.dl_ ricu0act.dll,ricu0act.dl_ ricu0acb.dll,ricu0acb.dl_ ricu0atl.exe,ricu0atl.ex_
[RPD_COMMON_SYS32] ricu0alm.dll,ricu0alm.dl_,,0x00000020
[RPD_COMMON] ricdb64.dll,ricdb64.dl_,,0x00000020 mfricr64.dll,mfricr64.dl_,,0x00000020 RD01Kd64.dll,RD01Kd64.dl_,,0x00000020
[RPD_DATA] ConfigFile = ricu0aui.dll DriverFile = ricu0agr.dll HelpFile = ricu0ach.chm
[DestinationDirs] DefaultDestDir = 66000 RPD_COMMON_SYS32 = 66002
[SourceDisksNames.amd64] 1 = %DSK%,,,
[PrinterPackageInstallation.amd64] PackageAware =TRUE
[SourceDisksFiles.amd64] ricu0aui.dl_ = 1 ricu0aui.irj = 1 ricu0aui.rdj = 1 ricu0aui.rcf = 1 ricu0aug.dl_ = 1 ricu0aug.miz = 1 ricu0aur.dl_ = 1 ricu0agr.dl_ = 1 ricu0agl.dl_ = 1 ricu0aci.dl_ = 1 ricu0acd.dl_ = 1 ricu0acd.psz = 1 ricu0acf.cfz = 1 ricu0acl.ini = 1 ricu0ach.chm = 1 ricu0acz.dlz = 1 ricu0acj.dl_ = 1 ricu0act.dl_ = 1 ricu0acb.dl_ = 1 ricu0alm.dl_ = 1 ricdb64.dl_ = 1 mfricr64.dl_ = 1 RD01Kd64.dl_ = 1 copcl6ud.txt = 1 ricu0atl.ex_ = 1
[Strings] Ricoh = "Ricoh" DrvName = "PCL6 Driver for Universal Print" CoDrvName = "RICOH PCL6 UniversalDriver V4.10" DSK = "PCL6 Printer Driver Disk1"
Edited by Mart (2016-10-06 09:00 AM)
|
|
Top
|
|
|
|
#212002 - 2016-10-05 11:35 PM
Re: The specified port is unknown? - AddPrinter() UDF
[Re: Allen]
|
TJahones
Fresh Scripter
Registered: 2016-10-05
Posts: 5
Loc: Canada
|
Hey Allen,
No worries at all, I really appreciate you taking a boo.
The port unknown is a GUI displayed error. I ran a hotfix that MS suggested (I figured maybe we had locked down our machines to the point they were missing a piece) but the error persists.
Perhaps I should try using a printer specific driver instead of the UPD?
The error code returns a 0
|
|
Top
|
|
|
|
#212004 - 2016-10-06 04:36 PM
Re: The specified port is unknown? - AddPrinter() UDF
[Re: Allen]
|
TJahones
Fresh Scripter
Registered: 2016-10-05
Posts: 5
Loc: Canada
|
The user is an admin.
Update - If I have the printer added by IP already (I did it with VBS just to test a different method) then my kiXtart logon script will run no problem and add the printer without issue.
So it makes me think creating the port is failing?
|
|
Top
|
|
|
|
#212007 - 2016-10-06 08:01 PM
Re: The specified port is unknown? - AddPrinter() UDF
[Re: Allen]
|
TJahones
Fresh Scripter
Registered: 2016-10-05
Posts: 5
Loc: Canada
|
So strange! If I run CMD as admin then run the script it works. If I right click, run logon.bat as admin - fails!
I was able to run it as admin for the dozen machines out there (rather than fight with using elevate)
Thanks again Allen - you rock!
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 1198 anonymous users online.
|
|
|