<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Script to remove orphaned/stale printer objects</title>
	<atom:link href="http://www.jhouseconsulting.com/2008/07/29/script-to-remove-orphanedstale-printer-objects-31/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jhouseconsulting.com/2008/07/29/script-to-remove-orphanedstale-printer-objects-31</link>
	<description>Application and Desktop Virtualization Specialist with Microsoft, Citrix, VMware and Quest products</description>
	<lastBuildDate>Mon, 19 Dec 2011 01:21:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jeremy</title>
		<link>http://www.jhouseconsulting.com/2008/07/29/script-to-remove-orphanedstale-printer-objects-31/comment-page-1#comment-6632</link>
		<dc:creator>jeremy</dc:creator>
		<pubDate>Thu, 01 Dec 2011 00:18:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.jhouseconsulting.com/index.php/jhouseconsulting/2008/07/29/script-to-remove-orphanedstale-printer-objects/#comment-6632</guid>
		<description>Hi William,

Sorry for not responding earlier. I wrote this for a Citrix environment where it&#039;s been used and tested many times on a Windows 2003 server. I have not tested it on a Windows XP workstation. However, from your description the &quot;Memory is locked&quot; error occurs when it tries to enumerate the registry using the EnumKey method and the array it is trying to return. There may be better ways to write this so that errors like these may be avoided. I will try and review it at some stage in the future. Just Googling shows that commenting out the Option Explicit statement and all the Dim statements helps. That&#039;s not a good practice, but may help people overcome this issue until I&#039;ve had time to re-write it.

Cheers,
Jeremy.</description>
		<content:encoded><![CDATA[<p>Hi William,</p>
<p>Sorry for not responding earlier. I wrote this for a Citrix environment where it&#8217;s been used and tested many times on a Windows 2003 server. I have not tested it on a Windows XP workstation. However, from your description the &#8220;Memory is locked&#8221; error occurs when it tries to enumerate the registry using the EnumKey method and the array it is trying to return. There may be better ways to write this so that errors like these may be avoided. I will try and review it at some stage in the future. Just Googling shows that commenting out the Option Explicit statement and all the Dim statements helps. That&#8217;s not a good practice, but may help people overcome this issue until I&#8217;ve had time to re-write it.</p>
<p>Cheers,<br />
Jeremy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeremy</title>
		<link>http://www.jhouseconsulting.com/2008/07/29/script-to-remove-orphanedstale-printer-objects-31/comment-page-1#comment-6631</link>
		<dc:creator>jeremy</dc:creator>
		<pubDate>Wed, 30 Nov 2011 23:31:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.jhouseconsulting.com/index.php/jhouseconsulting/2008/07/29/script-to-remove-orphanedstale-printer-objects/#comment-6631</guid>
		<description>If you&#039;re referring to &quot;Set oShell = Nothing&quot;, that&#039;s a very old habit and allows us to explicitly clean up the objects in the right order before they go out of scope. In this function there is only one object, so it&#039;s not a good example. However, if you had multiple objects and left it to the script engine to destroy them when they go out of scope, it may not do it in the desired order, and therefore destroy objects you&#039;re relying on in other areas within the procedures. Some will argue that it&#039;s unnecessary code. Others will argue that it&#039;s a best practice.
Cheers,
Jeremy.</description>
		<content:encoded><![CDATA[<p>If you&#8217;re referring to &#8220;Set oShell = Nothing&#8221;, that&#8217;s a very old habit and allows us to explicitly clean up the objects in the right order before they go out of scope. In this function there is only one object, so it&#8217;s not a good example. However, if you had multiple objects and left it to the script engine to destroy them when they go out of scope, it may not do it in the desired order, and therefore destroy objects you&#8217;re relying on in other areas within the procedures. Some will argue that it&#8217;s unnecessary code. Others will argue that it&#8217;s a best practice.<br />
Cheers,<br />
Jeremy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Captain Obvious</title>
		<link>http://www.jhouseconsulting.com/2008/07/29/script-to-remove-orphanedstale-printer-objects-31/comment-page-1#comment-6630</link>
		<dc:creator>Captain Obvious</dc:creator>
		<pubDate>Wed, 30 Nov 2011 22:45:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.jhouseconsulting.com/index.php/jhouseconsulting/2008/07/29/script-to-remove-orphanedstale-printer-objects/#comment-6630</guid>
		<description>I do not quite understand why you disassociate a local variable from its object right before you exit a procedure.</description>
		<content:encoded><![CDATA[<p>I do not quite understand why you disassociate a local variable from its object right before you exit a procedure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William DiDomenico</title>
		<link>http://www.jhouseconsulting.com/2008/07/29/script-to-remove-orphanedstale-printer-objects-31/comment-page-1#comment-6621</link>
		<dc:creator>William DiDomenico</dc:creator>
		<pubDate>Mon, 28 Feb 2011 16:38:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.jhouseconsulting.com/index.php/jhouseconsulting/2008/07/29/script-to-remove-orphanedstale-printer-objects/#comment-6621</guid>
		<description>I know this is an old post, but this script potentially does exactly what I need. However, running the script produces a &quot;Memory is locked&quot; error, citing line 66, character 3. The script is run against XP SP3 workstations. We need to remove printers from a test print server that were accidentally deployed in AD that are not removed by the more traditional RemovePrinterConnection function.</description>
		<content:encoded><![CDATA[<p>I know this is an old post, but this script potentially does exactly what I need. However, running the script produces a &#8220;Memory is locked&#8221; error, citing line 66, character 3. The script is run against XP SP3 workstations. We need to remove printers from a test print server that were accidentally deployed in AD that are not removed by the more traditional RemovePrinterConnection function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J House Consulting / Script to remove printers</title>
		<link>http://www.jhouseconsulting.com/2008/07/29/script-to-remove-orphanedstale-printer-objects-31/comment-page-1#comment-864</link>
		<dc:creator>J House Consulting / Script to remove printers</dc:creator>
		<pubDate>Wed, 30 Jul 2008 13:04:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.jhouseconsulting.com/index.php/jhouseconsulting/2008/07/29/script-to-remove-orphanedstale-printer-objects/#comment-864</guid>
		<description>[...] If, however, you find that some printers just cannot be removed, try my other script to remove orphaned/stale printer objects. [...]</description>
		<content:encoded><![CDATA[<p>[...] If, however, you find that some printers just cannot be removed, try my other script to remove orphaned/stale printer objects. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.jhouseconsulting.com @ 2012-02-08 00:04:45 -->
