#211876 - 2016-08-16 12:48 PM
UNKNOWN_PRINTER [1801]
|
mondo101
Fresh Scripter
Registered: 2010-10-22
Posts: 9
Loc: Ireland
|
Hi guys, I have added a new printer to our print server.When kix runs on login the printer doesn't map.Netlogon file shows the error UNKNOWN_PRINTER [1801]. Yet if I connect to Print server manually and connect, The printer connects fine and installs drivers ?
Ray
|
|
Top
|
|
|
|
#211879 - 2016-08-16 01:18 PM
Re: UNKNOWN_PRINTER [1801]
[Re: BradV]
|
mondo101
Fresh Scripter
Registered: 2010-10-22
Posts: 9
Loc: Ireland
|
Hiya, and thx for the reply.. Printer shared name and printer name are the same.. For some users it attaches fine.. Can I just elaborate on my situation...We recently moved from a server 2003 domain controller to server 2012 R2..Currently running kix 4.53. Should I be using the newest version now that I am server 2012 ? Also when setting script in users account I previously only ever used kix32 but I read somewhere that I need to use kix32.exe KixTart.kix
I say this because sometimes no script runs at all for users.
|
|
Top
|
|
|
|
#211881 - 2016-08-16 04:55 PM
Printers not mapping when users are in a group
|
mondo101
Fresh Scripter
Registered: 2010-10-22
Posts: 9
Loc: Ireland
|
Hi all, we recently moved to a new domain controller that runs our kix. server 2012. Users in groups no longer get their printers mapped ? If in AD on our domain you are in a group called sales and in In printers.ini we have printer mapping for group [sales] then any printers for that group do not get mapped for you. But If I remove the user from the group on the domain and use [username] in printers.ini then the printers map fine ? kix version 4.64 ... Is kix not recognising groups in server 2012 ?
Any ideas ? Ray.
|
|
Top
|
|
|
|
#211885 - 2016-08-17 11:33 AM
Re: Printers not mapping when users are in a group
[Re: Glenn Barnas]
|
mondo101
Fresh Scripter
Registered: 2010-10-22
Posts: 9
Loc: Ireland
|
Previously we were using kix version 4.53.. in server 2003 environment.
Is there a version recommended for server 2012 with windows 7 clients ?
Is it correct to say user profile for newer versions of kix need kix32.exe script.kix in their profile ?
|
|
Top
|
|
|
|
#211891 - 2016-08-18 06:34 PM
Re: Printers not mapping when users are in a group
[Re: Mart]
|
mondo101
Fresh Scripter
Registered: 2010-10-22
Posts: 9
Loc: Ireland
|
Hiya guys and thx for the replies... The unknown printer error was a typo on my side. Certain Groups not mapping printers is also sorted with an interesting outcome. In my printers.ini I had the first printer of the group that wouldn't map commented out (see below) as a result netlogon never shows "Found 'Group1' in INI. In fact it acts as though I have commented out the entire group ;[Group1] Removing the ; then allowed printers to be mapped. I then tidied it up by removing Printer1 and shifting all other printers down to this position.... any thoughts ?
I will remain on version 4.53 if you guys are saying this should still work in server 2012 Should I also leave the profile of each user as kix32 or change them all to kix32.exe kixtart.kix ?
[Group1] ;Printer1=1\\ps07sg01\PRN01174, HP Color LaserJet CP3505 PCL 6 Printer2=1\\ps07sg01\BIZHUB_C, BIZHUB C224E Printer3=1\\ps07sg01\BIZHUB_B, BIZHUB C224E Printer4=1\\ps07sg01\PRN01242, HP LaserJet 4250 PCL 6 Printer5=1\\ps07sg01\IHGHP2300, HP Universal Printing PCL 6 Printer6=1\\ps07sg01\IHGLC748, Lexmark C740 Series PS3 DefaultPrinter=5
|
|
Top
|
|
|
|
#211896 - 2016-08-19 11:06 AM
Re: Printers not mapping when users are in a group
[Re: Glenn Barnas]
|
mondo101
Fresh Scripter
Registered: 2010-10-22
Posts: 9
Loc: Ireland
|
Hiya guys, we have used ; many times over the years and it is used frequently in our printers.ini to comment on issues etc in the file. I have noticed the issue in more detail. No printer maps AFTER the comment is in place . eg: if I comment out just printer2 then only printer1 gets mapped.The rest do not get mapped.if I comment out printer1 no printers get mapped. Do I need to close off the comment at the end of each line ? eg: [Group1] Printer1=1\\ps07sg01\PRN01174, HP Color LaserJet CP3505 PCL 6 ;Printer2=1\\ps07sg01\BIZHUB_C, BIZHUB C224E Printer3=1\\ps07sg01\BIZHUB_B, BIZHUB C224E Printer4=1\\ps07sg01\PRN01242, HP LaserJet 4250 PCL 6 Printer5=1\\ps07sg01\IHGHP2300, HP Universal Printing PCL 6 Printer6=1\\ps07sg01\IHGLC748, Lexmark C740 Series PS3 DefaultPrinter=5
Only printer1 maps [Group1] Printer1=1\\ps07sg01\PRN01174, HP Color LaserJet CP3505 PCL 6 Printer2=1\\ps07sg01\BIZHUB_C, BIZHUB C224E Printer3=1\\ps07sg01\BIZHUB_B, BIZHUB C224E Printer4=1\\ps07sg01\PRN01242, HP LaserJet 4250 PCL 6 ;Printer5=1\\ps07sg01\IHGHP2300, HP Universal Printing PCL 6 Printer6=1\\ps07sg01\IHGLC748, Lexmark C740 Series PS3 DefaultPrinter=5
only Printers1,2,3,4 map.
|
|
Top
|
|
|
|
#211897 - 2016-08-19 12:41 PM
Re: Printers not mapping when users are in a group
[Re: mondo101]
|
Glenn Barnas
KiX Supporter
   
Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
|
That's not normal ReadProfileString() behavior - can you post the code that you use to read these entries?
I use INI files extensively, including my Universal Login Script, and that product in particular is delivered with a sample INI file where almost each line is described with a comment (or two). Two of my current commercial apps use INI files, and again, the sample files are heavily commented, and I've not had any issues. The ULS caches the file locally but then uses direct ReadProfileString calls to first return a list of sections, then it enumerates each section to return a list of values. The values found are then read. My latest app is a performance-sensitive server app and it uses the ReadIniArray() library, which loads the entire INI file into an array, then Read/WriteIniArray calls simply replace the corresponding Read/WriteProfileString function calls.
Your code should probably be something like$aPrinters = Split(ReadProfileString($IniFile, 'Group1'), Chr(10))
For Each $Printer in $aPrinters
$PData = ReadProfileString($IniFile, 'Group1', $Printer)
; for testing:
$Printer ' returned "' $PData '"' @CRLF
; do your printer stuff...
Next If you try this code by itself (define $IniFile with the name of the flie) it should show all of the non-commented printers. If you are not using ReadProfileString but using some other method to read the file, that could be exiting on the first line that doesn't begin with "Printer".
Glenn
_________________________
Actually I am a Rocket Scientist!
|
|
Top
|
|
|
|
#211930 - 2016-09-01 10:07 PM
Re: Printers not mapping when users are in a group
[Re: ShaneEP]
|
JNK
Fresh Scripter
Registered: 2006-04-11
Posts: 33
Loc: USA
|
I had a similar problem with a printer migration script a while back, except my error code was 1008 instead of 1801. I found that the first printer I tried to map on a particular print server would fail but subsequent attempts would be successful. My work-around was to detect the error and drop into a "retry" loop. I did include an escape hatch to avoid an endless loop in cases where the error was legit. Here is my code. Also note a couple of variable used need to be defined; not included here though.
$errcode = addprinterconnection($pshare)
$errtext = @serror
" @time - INFO: Result code " + $errcode + ": " + $errtext ?
select
case $errcode = 0
" @time - INFO: Added printer connection: " + ucase($pshare) + "."?
case $errcode = 1008
" @time - INFO: Entering add printer retry loop."?
$printer_loop = 0
do
$errcode = addprinterconnection($pshare)
$errtext = @serror
" @time - INFO: Result code " + $errcode + ": " + $errtext ?
if $errcode = 0
" @time - INFO: Added printer connection: " + ucase($pshare) + " on loop " + $printer_loop + "."?
else
" @time - INFO: Failed to add printer connection: " + ucase($pshare) + " on loop " + $printer_loop + "."?
endif
sleep 5
$printer_loop = $printer_loop + 1
until $errcode = 0 or $printer_loop > 6
case 1
" @time - ERROR: Failed to add printer " + $pshare + ". Error " + $errcode + ": " + $errtext ?
$scripterr = "yes"
endselect
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1202 anonymous users online.
|
|
|