Page 1 of 1 1
Topic Options
#211876 - 2016-08-16 12:48 PM UNKNOWN_PRINTER [1801]
mondo101 Offline
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
#211878 - 2016-08-16 12:54 PM Re: UNKNOWN_PRINTER [1801] [Re: mondo101]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 687
Loc: Maryland, USA
This was discussed quite recently I believe. Check your printer name versus the printer share name and how you are connecting to it. If you can, share that section of your code where you are mapping the printers.
Top
#211879 - 2016-08-16 01:18 PM Re: UNKNOWN_PRINTER [1801] [Re: BradV]
mondo101 Offline
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 Offline
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
#211883 - 2016-08-16 08:57 PM Re: Printers not mapping when users are in a group [Re: mondo101]
Glenn Barnas Administrator Online   content
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
Tough to tell without any code.. Kix has no issues with Server 2012, including R2.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#211884 - 2016-08-16 09:02 PM Re: UNKNOWN_PRINTER [1801] [Re: mondo101]
Glenn Barnas Administrator Online   content
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
There's a bug in current Kix versions where it does not find the login script during logon but finds the default script fine when invoked from the same folder. Ruud has acknowledged this and is working on a fix. Until then, "Kix32.exe kixtart.kix" is the safe solution when defining the user profile Login Script value. That should not, however, be the issue with V4.53, although better to be safe and specify the script name.

V4.53 is very stable - what you'd be missing from newer versions are the ProductType strings and a few minor enhancements.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#211885 - 2016-08-17 11:33 AM Re: Printers not mapping when users are in a group [Re: Glenn Barnas]
mondo101 Offline
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
#211886 - 2016-08-17 02:35 PM Re: UNKNOWN_PRINTER [1801] [Re: Glenn Barnas]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
Uhm.

There is no reason to upgrade in your situation.
The server is not doing the processing, the clients are.

Now, without any piece of script I have no idea what is going wrong.
What is this netlogon file? You actually have a log-file or is your black box showing an error?
_________________________
!

download KiXnet

Top
#211887 - 2016-08-17 02:42 PM Re: UNKNOWN_PRINTER [1801] [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
And in the end 1801 is clear error. You are doing something wrong. It's a friendly error that says exactly that.
_________________________
!

download KiXnet

Top
#211889 - 2016-08-17 03:07 PM Re: Printers not mapping when users are in a group [Re: mondo101]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
I believe the user profile issue began with 4.60 (if I remember correctly). Anything before that did not have the bug.
Top
#211890 - 2016-08-17 03:42 PM Re: Printers not mapping when users are in a group [Re: mondo101]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Can you post the code and (part of) the contents of the INI file so we can check?
As far as kix versions and Windows versions it should be fine. We are running on 4.64 and there are no isuses with that on 2K8 r2 and 2K12 r2 servers.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#211891 - 2016-08-18 06:34 PM Re: Printers not mapping when users are in a group [Re: Mart]
mondo101 Offline
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
#211892 - 2016-08-18 07:48 PM Re: Printers not mapping when users are in a group [Re: mondo101]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
I don't believe the ";" is used as a comment in INIs by default, unless whatever code you are using to read the INI is written that way. It more than likely just caused an error.
Top
#211893 - 2016-08-18 08:57 PM Re: Printers not mapping when users are in a group [Re: ShaneEP]
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
 Originally Posted By: ShaneEP
I don't believe the ";" is used as a comment in INIs by default, unless whatever code you are using to read the INI is written that way. It more than likely just caused an error.


you can use a ";" to comment out a line in an INI.

running
 Code:
? readprofilestring('.\sample.ini','Group1','')


against his sample ini data, gives you.

 Quote:
C:\1T Storage\Dropbox\KixTart\testing>kix32 test.kix

Printer2
Printer3
Printer4
Printer5
Printer6
DefaultPrinter

Top
#211894 - 2016-08-19 03:47 AM Re: Printers not mapping when users are in a group [Re: Bryce]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
Yea, ; is not defined in win 3.0 ini standard but is commonly used and most programs reading ini-files ignore the lines starting with unacceptable characters.
_________________________
!

download KiXnet

Top
#211895 - 2016-08-19 04:20 AM Re: Printers not mapping when users are in a group [Re: Lonkero]
Glenn Barnas Administrator Online   content
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
I would change the profile now, even though not necessary, as it will permit upgrading to any of the more-current versions where that feature is broken. Reports from Ruud indicate that this will be fixed in the next (4.67) release.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#211896 - 2016-08-19 11:06 AM Re: Printers not mapping when users are in a group [Re: Glenn Barnas]
mondo101 Offline
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 Administrator Online   content
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
 Code:
$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! \:D

Top
#211930 - 2016-09-01 10:07 PM Re: Printers not mapping when users are in a group [Re: ShaneEP]
JNK Offline
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.

 Code:
$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
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1202 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.073 seconds in which 0.027 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org