Page 1 of 1 1
Topic Options
#114705 - 2004-02-24 05:04 PM Logging printers for Citrix (NT 4 TSE)
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
We ran into a situation yesterday, where we had to look through the printer drivers and files that are installed on our Citrix Servers in the Farm.. Anyway, you need the LOGGER() UDF to complete this -
Logging in a Citrix Farm -
Code:

CLS
BREAK ON
FOR EACH $i IN Split('01 02 03 05 06 07 08 09')
$srvname='CITRIX'+$i
$srv="\\"+$srvname+"\HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-2\"
$index=0
DO
$keyname=ENUMKEY($srv,$index)
$drv=READVALUE($srv+$keyname,'Data File')
$logdata='\\'+$srvname+','+$keyname
LOGGER('H:\CitrixPrinters.csv',$logdata+@crlf)
FOR EACH $fl IN SPLIT(READVALUE($srv+$keyname,'Dependent Files'),'|')
IF LEN($fl)>0
$companyname=GETFILEVERSION('\\'+$srvname+'\admin$\system32\spool\drivers\w32x86\'+$fl,"CompanyName")
$fileversion=GETFILEVERSION('\\'+$srvname+'\admin$\system32\spool\drivers\w32x86\'+$fl,"FileVersion")
ENDIF
$logdata=','+','+$fl+','+$companyname+','+$fileversion
LOGGER('H:\CitrixPrinters.csv',$logdata+@crlf)
NEXT
$dep=""
$companyname=""
$fileversion=""
$index = $index + 1
UNTIL LEN($keyname)=0
NEXT



Specific Print Server (Windows 2000 Example) -
Code:

CLS
BREAK ON
$srvname='SERVER'
$srv="\\"+$srvname+"\HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\"
$index=0
DO
$keyname=ENUMKEY($srv,$index)
$drv=READVALUE($srv+$keyname,'Data File')
$logdata='\\'+$srvname+','+$keyname
LOGGER('H:\Printers.csv',$logdata+@crlf)
FOR EACH $fl IN SPLIT(READVALUE($srv+$keyname,'Dependent Files'),'|')
IF LEN($fl)>0
$companyname=GETFILEVERSION('\\'+$srvname+'\admin$\system32\spool\drivers\w32x86\3\'+$fl,"CompanyName")
$fileversion=GETFILEVERSION('\\'+$srvname+'\admin$\system32\spool\drivers\w32x86\3\'+$fl,"FileVersion")
ENDIF
$logdata=','+','+$fl+','+$companyname+','+$fileversion
LOGGER('H:\Printers.csv',$logdata+@crlf)
NEXT
$dep=""
$companyname=""
$fileversion=""
$index = $index + 1
UNTIL LEN($keyname)=0



HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#114706 - 2004-02-25 02:44 PM Re: Logging printers for Citrix (NT 4 TSE)
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
BTW, this will also work with W2k or greater print server systems. You need to change version 2 to 3..
Code:

$srv="\\CITRIX"+$i+"\HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3"


And..
Code:

$srv+'\admin$$\system32\spool\drivers\w32x86\3


I will post a corrected version of this today once I get into work.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#114707 - 2004-02-25 03:49 PM Re: Logging printers for Citrix (NT 4 TSE)
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Yes, and no.

W2K+ native printer drivers are version 3, but it will also use version 2 if that is what is available.

If you use printmig.exe to move from NT4 to W2K for example, you may migrate the version 2 drivers.

Top
#114708 - 2004-02-25 06:10 PM Re: Logging printers for Citrix (NT 4 TSE)
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
I posted this to diagnose issues with our NT 4 TSE systems. It helped us find driver version variations and in one case, it found that there was one that did not have the proper number of drivers installed.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#114709 - 2004-02-26 01:07 PM Re: Logging printers for Citrix (NT 4 TSE)
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
I have a Citrix server farm - when a new server is added to the farm I use "printmig" to quickly duplicate printer drivers from one of the existing servers.
Top
#114710 - 2004-02-26 02:13 PM Re: Logging printers for Citrix (NT 4 TSE)
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
That was one of the questions that I had for my Citrix guy.. Why don't the drivers, settings and so on not get copied or replicated between on another? If they are to work in tandem, why not?

However, that is a great point about PrintMig..

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
Page 1 of 1 1


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

Who's Online
1 registered (Allen) and 1607 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.052 seconds in which 0.022 seconds were spent on a total of 12 queries. Zlib compression enabled.

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