<?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>DSI</title>
	<atom:link href="http://www.destiny-sys.com/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.destiny-sys.com/wordpress</link>
	<description>All things technology</description>
	<lastBuildDate>Fri, 16 Apr 2010 21:18:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Troubleshooting scripted printer driver installations</title>
		<link>http://www.destiny-sys.com/wordpress/2009/05/23/troubleshooting-scripted-printer-driver-installations/</link>
		<comments>http://www.destiny-sys.com/wordpress/2009/05/23/troubleshooting-scripted-printer-driver-installations/#comments</comments>
		<pubDate>Sat, 23 May 2009 19:32:39 +0000</pubDate>
		<dc:creator>ET</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.destiny-sys.com/wordpress/?p=14</guid>
		<description><![CDATA[I came across an interesting problem one day when I was trying to install a printer driver in Windows XP through known-working vbscript files. One script was custom made and the other was the built-in prndrvr.vbs file included with the operating system. The same driver that installed without a problem using the Add a Printer [...]]]></description>
			<content:encoded><![CDATA[<p>I came across an interesting problem one day when I was trying to install a printer driver in Windows XP through known-working vbscript files. One script was custom made and the other was the built-in prndrvr.vbs file included with the operating system. The same driver that installed without a problem using the Add a Printer wizard won&#8217;t install when using vbscript. All I would get back is a simple error code 2.</p>
<p>After referencing Microsoft&#8217;s MSDN article on the <a title="AddPrinterDriver Method of the Win32_PrinterDriver Class (Windows)" href="http://msdn.microsoft.com/en-us/library/aa384771(VS.85).aspx" target="_blank">Win32_PrinterDriver.AddPrinterDriver method</a>, I was pointed to the standard <a title="WMI Error Constants (Windows)" href="http://msdn.microsoft.com/en-us/library/aa394559(VS.85).aspx" target="_blank">WMI Error Constants page</a>, which then told me to use the system&#8217;s built-in <em><span style="color: #3366ff;">net helpmsg</span></em> command to find out what the error code 2 was: <em>The system cannot find the file specified.</em></p>
<p>I found that to be odd &#8211; how can a file be missing if that same driver package works 100% when using the GUI to install it? To find out what was going on, I made use of the Microsoft SetupAPI log file. Details are available in a whitepaper at Microsoft&#8217;s <a title="Troubleshooting Device Installation with the SetupAPI Log File" href="http://www.microsoft.com/whdc/driver/install/setupapilog.mspx" target="_blank">Windows Hardware Developer Central</a>. While the whitepaper goes into extreme details, I only needed to do the basics to determine the cause of this installation failure. I left the SetupAPI log level at 0, which proved to be sufficient.</p>
<p>For simplicity in documentation, I used the existing prndrvr.vbs file that is included in Windows XP. The results of my findings are shown below:</p>
<p><strong>Command entered:</strong><br />
cscript prndrvr.vbs -a -m &#8220;HP LaserJet P4010_P4510 Series PCL 6&#8243; -v 3 -e &#8220;Windows NT x86&#8243; -i &#8220;I:\\Public\\Drivers\\HP LaserJet P4010 Series\\hpc4015c.inf&#8221;<strong></strong></p>
<p><strong>Result:</strong><br />
Microsoft (R) Windows Script Host Version 5.7<br />
Copyright (C) Microsoft Corporation. All rights reserved.</p>
<p>Unable to add printer driver HP LaserJet P4010_P4510 Series PCL 6 Win32 error code 2</p>
<p><strong>Result in C:\Windows\Setupapi.log:</strong><br />
[SetupAPI Log]<br />
OS Version = 5.1.2600 Service Pack 3<br />
Platform ID = 2 (NT)<br />
Service Pack = 3.0<br />
Suite = 0&#215;0100<br />
Product Type = 1<br />
Architecture = x86<br />
[2009/05/11 09:49:47 4216.4 Driver Install]<br />
#-198 Command line processed: C:\WINDOWS\system32\wbem\wmiprvse.exe<br />
#I060 Set selected driver.<br />
#I060 Set selected driver.<br />
[2009/05/11 09:49:47 4216.5]<br />
#-198 Command line processed: C:\WINDOWS\system32\wbem\wmiprvse.exe<br />
#-167 SPFILENOTIFY_NEEDMEDIA: Tag = &#8220;<span style="color: #0000ff;">p6i2enww.cab</span>&#8220;, Description= &#8220;HP LaserJet P4015/4014/4515 PCL 6 CD&#8221;, SourcePath = &#8220;i:\ public\drivers\hp laserjet p4010 series&#8221;, SourceFile = &#8220;<span style="color: #0000ff;">UNIDRV.HLP</span>&#8220;, Flags = 0&#215;00000000.<br />
<span style="color: #ff0000;">#E169 SPFILENOTIFY_NEEDMEDIA: returned FILEOP_ABORT. Error 2: The system cannot find the file specified.</span><br />
#W187 Install failed, attempting to restore original files.</p>
<p>As it can be seen from the log file, the WMI method Win32_PrinterDriver.AddPrinterDriver could not locate the file p6i2enww.cab, which contains the English localized copy of unidrv.hlp. To help WMI out I simply extracted the unidrv.hlp file from p6i2enww.cab to the folder containing the driver files. Since all the Windows installations I deal with are English localized (and the fact that I don&#8217;t know of anyone who actually uses the printer driver help file), forcing an English localization isn&#8217;t a problem.</p>
<p>After adding the &#8220;missing&#8221; file to the install folder and executing the vbscript again the print driver installed without a problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.destiny-sys.com/wordpress/2009/05/23/troubleshooting-scripted-printer-driver-installations/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>A new beginning&#8230;</title>
		<link>http://www.destiny-sys.com/wordpress/2009/01/19/a-new-beginning/</link>
		<comments>http://www.destiny-sys.com/wordpress/2009/01/19/a-new-beginning/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 04:44:39 +0000</pubDate>
		<dc:creator>ET</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://destiny-sys.com/wordpress/?p=4</guid>
		<description><![CDATA[Stay tuned for future articles on Windows scripting with vbscript and Windows Management Instrumentation. One of my first posts will be my ongoing enhancement of a remote printer deployment script I originally created to help install a new printer to 30 Windows XP-based computers. This script was later enhanced to support the deployment of different [...]]]></description>
			<content:encoded><![CDATA[<p>Stay tuned for future articles on Windows scripting with vbscript and Windows Management Instrumentation.</p>
<p>One of my first posts will be my ongoing enhancement of a remote printer deployment script I originally created to help install a new printer to 30 Windows XP-based computers. This script was later enhanced to support the deployment of different printers based on the subnet the target computer is in. To date this script has been successful installing drivers for the following line of printers: Ricoh Aficio, Canon imageRunner, and HP LaserJet.</p>
<p>As of this writing I have only come across two drivers that failed to install using my remote printer deployment script: HP Color LaserJet 4650dtn and HP LaserJet P4010dtn. These same drivers installed flawlessly when used with the Add Printer Wizard GUI. I was able to find the cause of the driver installation failure when scripted and will be creating a separate article on finding issues like this and &#8220;patching&#8221; the driver files so that they work properly in a script.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.destiny-sys.com/wordpress/2009/01/19/a-new-beginning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.317 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-07-29 10:58:22 -->
