<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>James&#039; Tools and Tricks &#187; print servers</title>
	<atom:link href="http://jrudd.org/tag/print-servers/feed/" rel="self" type="application/rss+xml" />
	<link>http://jrudd.org</link>
	<description>Tools, Tips and Hints for managing a network.</description>
	<lastBuildDate>Sun, 08 Jan 2012 03:50:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HP Printers &#8211; &#8220;Printer driver is not installed&#8221; on Windows 2008 R2</title>
		<link>http://jrudd.org/2010/05/hp-printers-printer-driver-is-not-installed-on-windows-2008-r2/</link>
		<comments>http://jrudd.org/2010/05/hp-printers-printer-driver-is-not-installed-on-windows-2008-r2/#comments</comments>
		<pubDate>Mon, 17 May 2010 00:59:05 +0000</pubDate>
		<dc:creator>James Rudd</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[Bulk Operations]]></category>
		<category><![CDATA[hp printers]]></category>
		<category><![CDATA[HPTrayCount]]></category>
		<category><![CDATA[microsoft windows]]></category>
		<category><![CDATA[print management]]></category>
		<category><![CDATA[print servers]]></category>
		<category><![CDATA[printer driver]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server 2008 R2]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[vbscript]]></category>

		<guid isPermaLink="false">http://jrudd.org/wordpress/?p=134</guid>
		<description><![CDATA[Recently I migrated all our printers from a Server 2003 R2 x32 print server to Server 2008 R2 (x64). During this upgrade all the printers had x64 drivers added and their security settings checked. However, I kept experiencing problems in Print Management with the HP printers reporting the Printer driver is not installed, even after <a href='http://jrudd.org/2010/05/hp-printers-printer-driver-is-not-installed-on-windows-2008-r2/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Recently I <a href="http://trycatch.be/blogs/roggenk/archive/2008/05/13/windows-server-2008-printer-migration-and-consolidation.aspx">migrated all our printers</a> from a <a href="http://xmstechnology.glve.be/archives/41">Server 2003 R2 x32 print server to Server 2008 R2 (x64)</a>. During this upgrade all the printers had x64 drivers added and their security settings checked. However, I kept experiencing problems in Print Management with the HP printers reporting the <em>Printer driver is not installed</em>, even after it had been repeatedly added and appeared in list of installed drivers.</p>
<p>Finally I found a <a href="http://social.technet.microsoft.com/Forums/en/winserverprint/thread/5101195b-3aca-4699-9a06-db4578614e2d">Technet discussion</a> on the issue, which correctly identified an incorrect registry value <em>HPTrayCount </em>which is set to 0 when the printer driver is changed, but is not set back to a working value.</p>
<p>This value needs to be changed to 0&#215;12 (decimal 18) for each HP printer for it to work correctly. However, on print servers with lots of HP printers this can be very time consuming. To speed this process I have written the vbscript below which will check if the value exists for each printer, and if it is set to 0 will set it to 0&#215;12.</p>
<pre class="brush: vb; title: ; notranslate">
' For each Printer in Registry check if HPTrayCount exists and is set to 0, then set to 12

'http://social.technet.microsoft.com/Forums/en/winserverprint/thread/5101195b-3aca-4699-9a06-db4578614e2d

strKeyPath = &quot;SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers&quot;
strValueName = &quot;HPTrayCount&quot;
inHPValue = 18 ' Is equal to Hex 12, makesprinter driver work.

'http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/registry/#EnumRegVals.htm
const HKEY_LOCAL_MACHINE = &amp;H80000002
strComputer = &quot;.&quot;
Set StdOut = WScript.StdOut

Set oReg=GetObject(&quot;winmgmts:{impersonationLevel=impersonate}!\\&quot; &amp; _
strComputer &amp; &quot;\root\default:StdRegProv&quot;)

' Get list of Printers
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

For Each subkey In arrSubKeys
  ' Read in HP Tray value
  strPrintPath = strKeyPath &amp; &quot;\&quot; &amp; subkey &amp; &quot;\PrinterDriverData&quot;
  oReg.GetDWORDValue HKEY_LOCAL_MACHINE,strPrintPath,strValueName,dwValue
  If Not IsNull (dwValue) And dwValue = 0 Then
    'If Exists and 0 then set it to a real value to make it work
    StdOut.WriteLine subkey &amp; &quot;: HP Tray: &quot; &amp; dwValue
    oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strPrintPath,strValueName,inHPValue
  End If
Next
</pre>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 620px; width: 1px; height: 1px; overflow: hidden;">
<pre></pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://jrudd.org/2010/05/hp-printers-printer-driver-is-not-installed-on-windows-2008-r2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

