With the help of the KiX gurus I created a login script to work on a WAN. You will see I have incorporated UDF() utilities from this KiX board.

I've culled the code so to focus on the particular issue.

Basically, we have 7 offices each controled by their own server and I want to install the appropriate printers at each site for each user.

The ccode is essentially as follows:

 Code:
;=================== Printer Settings =================================
SELECT
  CASE @LSERVER = "\\MYHOSTCV"
    $_Pr = "\\MYHOSTCV\Barney"
    PrintMaker($_pr)
    $_Pr = "\\MYHOSTCV\MFP"
    PrintMaker($_pr)
    $_Pr = "\\MYHOSTCV\MFP_Reception"
    PrintMaker($_pr)
    $_Pr = "\\MYHOSTCV\HPColour"
    PrintMaker($_pr)
  CASE @LSERVER = "\\MYHOSTED"
    $_Pr = "\\MYHOSTED\Basil_Print"
    PrintMaker($_pr)
    $_Pr = "\\MYHOSTED\HP_Colour"
    PrintMaker($_pr)
    $_Pr = "\\MYHOSTED\HP_Colour_Duplex"
    PrintMaker($_pr)
ENDSELECT

;============================ FUNCTION PriMapState ========================

;FUNCTION	PriMapState 
; 
;AUTHOR		Lonkero (Jooel.Nieminen@gwspikval.com) 
; 
;ACTION		Checks for existent networkprinter connection 
; 
;VERSION	1.1.1 
; 
;CHANGES	1.1.1	- 01. november 2003 
;		 Fixed buggie descriped in: 
;		 http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=1;t=008079 
;		1.1	- 02. July 2002 
;		 added support for win9x 
;		1.0	- 01. July 2002 
;		 initial release 
; 
;SYNTAX		PriMapState(PRINTER) 
; 
;PARAMETERS	PRINTER 
;		 to be checked Printer's name 
; 
;RETURNS	1 if printer connected 
;		2 if printer is default 
;		nothing if not connected 
; 
;REMARKS	code for w9x adapted from BrianTX 
; 
;DEPENDENCIES	none 
; 
;EXAMPLE 
;		if not PriMapState('\\server\printer1') 
;		 "printer1 not connected!" 
;	        endif 
; 
;CODE 
function PriMapState($_Pri)
if @inwin=1
 if len(readvalue("HKCU\Software\Microsoft\Windows NT\CurrentVersion\Devices",$_Pri))
  if split(readvalue("HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows","Device"),",")[0]=$_Pri
   $PriMapState=2
  else
   $PriMapState=1
  endif
 endif
else
 dim $_Root,$_C,$_C2 $_Root="HKLM\System\CurrentControlSet\control\Print\Printers"
 for $_C=0 to 259
  $_C2=enumkey($_Root,$_C)
  If instr(READVALUE($_Root+"\"+$_C2,"Port"),$_Pri)
   If instr(READPROFILESTRING("%windir%\win.ini","windows","device"),$_Pri)
    $PriMapState = 2
   Else
    $PriMapState = 1
   Endif
  Endif
  if $_C2=259 $_C=$_C2 endif
 next
endif
endfunction


;============================ FUNCTION PrintMaker ============================
FUNCTION PrintMaker($_pr)
  IF PriMapState($_pr) = 0
    $null = ADDPRINTERCONNECTION($_Pr)
  ENDIF
ENDFUNCTION



Systems are Win2k3 servers and WinXP (SP3) workstations. Printers are HP (4600 colour, 3055 MFP, HP4200, Richoh Aficio). Printer names are the same as printer shares.

All printers are mapped correctly (at all sites). All printers are installed on the local server and all printers have unique static IP addresses (like 192.168.x.150 - 155) where x is unique to each site.

My issue is that ONE site is unable to print to the Kix shared printers.

In my code the users at MYHOSTED cannot print to their printers. Print jobs appear in the printer folder but no paper comes out. I cannot print a test page from the workstations.

I can use Internet Explorer and access each printer's internal web address and even print font lists etc from the web page.

If I experimentally install the printer as a local IP printer at a workstation, the printer works!

BTY, I have restarted the local server, local workstation Print Spooler.

At other sites the Kix shared printers work well - just one site won't work!



Edited by Ashpoint (2008-12-19 10:02 PM)
Edit Reason: Changed Subject (nt) should be NOT