<?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>Saved for later reference</title>
	<atom:link href="http://www.lejordet.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lejordet.com</link>
	<description>online repository of stuff I had to google for hours to figure out</description>
	<lastBuildDate>Tue, 31 Jan 2012 19:37:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>FizzBuzz with Reactive Extensions</title>
		<link>http://www.lejordet.com/2012/01/fizzbuzz-with-reactive-extensions/</link>
		<comments>http://www.lejordet.com/2012/01/fizzbuzz-with-reactive-extensions/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 19:37:17 +0000</pubDate>
		<dc:creator>Lars Erik Jordet</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.lejordet.com/?p=135</guid>
		<description><![CDATA[I played around with &#8211; and tried to do the &#8220;classic&#8221; FizzBuzz programming test in an obnoxious way. Here&#8217;s what I&#8217;ve got so far, but I think it&#8217;s possible to make it more convoluted than this: 1234567891011121314151617181920212223242526272829303132333435363738using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Reactive.Linq; namespace FizzBuzz &#123; &#160; &#160; public delegate void NumberEventHandler&#40;object [...]]]></description>
			<content:encoded><![CDATA[<p>I played around with 
<a  href="http://msdn.microsoft.com/en-us/data/gg577609" title="Reactive Extensions" onclick="javascript:pageTracker._trackPageview('/external/msdn.microsoft.com/en-us/data/gg577609');" ></a> &#8211; and tried to do the &#8220;classic&#8221; 
<a  href="http://rosettacode.org/wiki/FizzBuzz" onclick="javascript:pageTracker._trackPageview('/external/rosettacode.org/wiki/FizzBuzz');" >FizzBuzz</a> programming test in an obnoxious way.</p>
<p>Here&#8217;s what I&#8217;ve got so far, but I think it&#8217;s possible to make it more convoluted than this:</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br /></div></td><td><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Collections.Generic</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Linq</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Text</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Reactive.Linq</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">namespace</span> FizzBuzz<br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">delegate</span> <span style="color: #6666cc; font-weight: bold;">void</span> NumberEventHandler<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, <span style="color: #6666cc; font-weight: bold;">long</span> e<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #6666cc; font-weight: bold;">class</span> Program<br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #0600FF; font-weight: bold;">event</span> NumberEventHandler AnyNum<span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> Main<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> args<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var numbergenerator <span style="color: #008000;">=</span> Observable<span style="color: #008000;">.</span><span style="color: #0000FF;">Interval</span><span style="color: #008000;">&#40;</span>TimeSpan<span style="color: #008000;">.</span><span style="color: #0000FF;">FromMilliseconds</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var numbers <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">from</span> n <span style="color: #0600FF; font-weight: bold;">in</span> numbergenerator <span style="color: #0600FF; font-weight: bold;">where</span> n <span style="color: #008000;">&gt;</span> <span style="color: #FF0000;">0</span> <span style="color: #008000;">&amp;&amp;</span> n <span style="color: #008000;">&lt;=</span> <span style="color: #FF0000;">100</span> <span style="color: #0600FF; font-weight: bold;">select</span> n<span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var numberobs <span style="color: #008000;">=</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Observable<span style="color: #008000;">.</span><span style="color: #0000FF;">FromEvent</span><span style="color: #008000;">&lt;</span>NumberEventHandler, <span style="color: #6666cc; font-weight: bold;">long</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ev <span style="color: #008000;">=&gt;</span> <span style="color: #008000;">&#123;</span> NumberEventHandler neh <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span>sender, e<span style="color: #008000;">&#41;</span> <span style="color: #008000;">=&gt;</span> <span style="color: #008000;">&#123;</span> ev<span style="color: #008000;">&#40;</span>e<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span><span style="color: #008000;">;</span> <span style="color: #0600FF; font-weight: bold;">return</span> neh<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ev <span style="color: #008000;">=&gt;</span> AnyNum <span style="color: #008000;">+=</span> ev,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ev <span style="color: #008000;">=&gt;</span> AnyNum <span style="color: #008000;">-=</span> ev<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var watchforfizz <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">from</span> n <span style="color: #0600FF; font-weight: bold;">in</span> numberobs <span style="color: #0600FF; font-weight: bold;">where</span> n <span style="color: #008000;">%</span> <span style="color: #FF0000;">3</span> <span style="color: #008000;">==</span> <span style="color: #FF0000;">0</span> <span style="color: #0600FF; font-weight: bold;">select</span> <span style="color: #666666;">&quot;Fizz&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var watchforbuzz <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">from</span> n <span style="color: #0600FF; font-weight: bold;">in</span> numberobs <span style="color: #0600FF; font-weight: bold;">where</span> n <span style="color: #008000;">%</span> <span style="color: #FF0000;">5</span> <span style="color: #008000;">==</span> <span style="color: #FF0000;">0</span> <span style="color: #0600FF; font-weight: bold;">select</span> <span style="color: #666666;">&quot;Buzz&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var watchforothers <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">from</span> n <span style="color: #0600FF; font-weight: bold;">in</span> numberobs <span style="color: #0600FF; font-weight: bold;">select</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>n <span style="color: #008000;">%</span> <span style="color: #FF0000;">3</span> <span style="color: #008000;">!=</span> <span style="color: #FF0000;">0</span> <span style="color: #008000;">&amp;&amp;</span> n <span style="color: #008000;">%</span> <span style="color: #FF0000;">5</span> <span style="color: #008000;">!=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">?</span>n<span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">:</span><span style="color: #666666;">&quot;&quot;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; watchforfizz<span style="color: #008000;">.</span><span style="color: #0000FF;">Subscribe</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> <span style="color: #008000;">&#123;</span> Console<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span>x<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; watchforbuzz<span style="color: #008000;">.</span><span style="color: #0000FF;">Subscribe</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> <span style="color: #008000;">&#123;</span> Console<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span>x<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; watchforothers<span style="color: #008000;">.</span><span style="color: #0000FF;">Subscribe</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> <span style="color: #008000;">&#123;</span> Console<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span>x<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; numbers<span style="color: #008000;">.</span><span style="color: #0000FF;">Subscribe</span><span style="color: #008000;">&#40;</span>x <span style="color: #008000;">=&gt;</span> AnyNum<span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">null</span>, x<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console<span style="color: #008000;">.</span><span style="color: #0000FF;">ReadKey</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<span style="color: #008000;">&#125;</span></div></td></tr></tbody></table></div>
<p>Key features are the number generator, and the three filter event handlers. I feel like there should a better way of handling the &#8220;regular&#8221; numbers, but close enough.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.lejordet.com%2F2012%2F01%2Ffizzbuzz-with-reactive-extensions%2F&amp;title=FizzBuzz%20with%20Reactive%20Extensions" id="wpa2a_2"><img src="http://www.lejordet.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.lejordet.com/2012/01/fizzbuzz-with-reactive-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Please provide path to Windows media (x86 processor)&#8221; when installing printer</title>
		<link>http://www.lejordet.com/2011/01/please-provide-path-to-windows-media-x86-processor-when-installing-printer/</link>
		<comments>http://www.lejordet.com/2011/01/please-provide-path-to-windows-media-x86-processor-when-installing-printer/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 19:45:39 +0000</pubDate>
		<dc:creator>Lars Erik Jordet</dc:creator>
				<category><![CDATA[windows]]></category>
		<category><![CDATA[2008]]></category>
		<category><![CDATA[2008r2]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[driver]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[r2]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[win32]]></category>
		<category><![CDATA[win64]]></category>

		<guid isPermaLink="false">http://www.lejordet.com/?p=130</guid>
		<description><![CDATA[Trying to install the x86 printer driver for some printers on Windows Server 2008 R2 prompts you for the path to x86 media, with no indication of which media it actually means. This is how to fix it.]]></description>
			<content:encoded><![CDATA[<p>When installing a new printer earlier, I first installed it in Windows Server 2008 R2 (which of course only exists in a x64 version), and tried to add the x86 (XP) driver since all the clients run XP.</p>
<p>After providing the &#8220;additional drivers&#8221;-wizard with the printer driver, it asked me to &#8220;Please provide path to Windows media (x86 processor)&#8221;, which was a bit difficult since I had no 32-bit media (I would have tried 2008 32bit or similar, if so).</p>
<p>Turns out, the solution is blindingly simple: Share the printer, and with an admin user (typically the same who installed the printer on the server), log on to an XP computer, and install the shared printer from there. It will ask you to provide the driver since the server has none. After installing, go into printer properties in XP, find Sharing, Additional drivers&#8230;, and check off &#8220;Windows XP/2000, x86&#8243;. The driver will be uploaded to the server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lejordet.com/2011/01/please-provide-path-to-windows-media-x86-processor-when-installing-printer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8220;Microsoft Dynamics CRM for Outlook with Offline Access has already been configured for a user on this computer. Only one use can be configured per computer for Microsoft CRM for Outlook with Offline Access.&#8221;</title>
		<link>http://www.lejordet.com/2010/09/microsoft-dynamics-crm-for-outlook-with-offline-access-has-already-been-configured-for-a-user-on-this-computer-only-one-use-can-be-configured-per-computer-for-microsoft-crm-for-outlook-with-offline/</link>
		<comments>http://www.lejordet.com/2010/09/microsoft-dynamics-crm-for-outlook-with-offline-access-has-already-been-configured-for-a-user-on-this-computer-only-one-use-can-be-configured-per-computer-for-microsoft-crm-for-outlook-with-offline/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 11:46:57 +0000</pubDate>
		<dc:creator>Lars Erik Jordet</dc:creator>
				<category><![CDATA[office]]></category>
		<category><![CDATA[quick]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[dynamics]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://www.lejordet.com/?p=126</guid>
		<description><![CDATA["Microsoft Dynamics CRM for Outlook with Offline Access has already been configured for a user on this computer. Only one use can be configured per computer for Microsoft CRM for Outlook with Offline Access." - how to configure Dynamics for a different user.]]></description>
			<content:encoded><![CDATA[<p>If you try to swap users on a laptop, with Dynamics CRM installed in Offline Access mode, it will give the error above; searching gave me 
<a  href="http://blogs.technet.com/b/crmchina/archive/2010/06/04/quot-microsoft-dynamics-crm-for-outlook-with-offline-access-has-already-been-configured-for-a-user-on-this-computer-only-one-use-can-be-configured-per-computer-for-microsoft-crm-for-outlook-with-offline-access-quot.aspx" onclick="javascript:pageTracker._trackPageview('/external/blogs.technet.com/b/crmchina/archive/2010/06/04/quot-microsoft-dynamics-crm-for-outlook-with-offline-access-has-already-been-configured-for-a-user-on-this-computer-only-one-use-can-be-configured-per-computer-for-microsoft-crm-for-outlook-with-offline-access-quot.aspx');" >this page from the Chinese Dynamics CRM team</a>, so I&#8217;m just going to repeat it here:</p>
<div class="codecolorer-container dos blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; C:\<span style="color: #33cc33;">&gt;</span>osql –E –S localhost\CRM<br />
&nbsp; &nbsp; &nbsp; 1<span style="color: #33cc33;">&gt;</span> drop database mscrm_msde<br />
&nbsp; &nbsp; &nbsp; 2<span style="color: #33cc33;">&gt;</span> go<br />
&nbsp; &nbsp; &nbsp; 1<span style="color: #33cc33;">&gt;</span> quit</div></td></tr></tbody></table></div>
<p>Basically, you connect to the SQL Server on the local computer, and delete the Offline Access database, allowing you to reconfigure as normal. Note that this won&#8217;t let you reconfigure the user as &#8220;online only&#8221; &#8211; the new configuration will automatically be Offline Access.</p>
<p>Secondly, this works even if the user is not Local Administrator on the computer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lejordet.com/2010/09/microsoft-dynamics-crm-for-outlook-with-offline-access-has-already-been-configured-for-a-user-on-this-computer-only-one-use-can-be-configured-per-computer-for-microsoft-crm-for-outlook-with-offline/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script to add a network printer automatically in Windows</title>
		<link>http://www.lejordet.com/2010/08/script-to-add-a-network-printer-automatically-in-windows/</link>
		<comments>http://www.lejordet.com/2010/08/script-to-add-a-network-printer-automatically-in-windows/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 08:47:04 +0000</pubDate>
		<dc:creator>Lars Erik Jordet</dc:creator>
				<category><![CDATA[quick]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[install printer]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://www.lejordet.com/?p=120</guid>
		<description><![CDATA[Batch script to install or replace a Windows network printer]]></description>
			<content:encoded><![CDATA[<p>I recently had to replace a defective printer with a similar model, but different enough to need a new driver. This meant it would have a new name on the print server, and I had to figure out a way to replace the installed printer on each computer quickly. After some searching, I ended up with the following script:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">@echo off<br />
set OLDPRINTER=&quot;\\printserver\Xerox Phaser 8560N&quot;<br />
set NEWPRINTER=&quot;\\printserver\Xerox Phaser 8560DN PS&quot;<br />
rundll32 printui.dll,PrintUIEntry /q /dn /n%OLDPRINTER%<br />
rundll32 printui.dll,PrintUIEntry /in /n%NEWPRINTER% /q<br />
rundll32 printui.dll,PrintUIEntry /y /n%NEWPRINTER%</div></td></tr></tbody></table></div>
<p>The first rundll32 line quietly (/q) deletes (/dn) the printer named (/n) %OLDPRINTER%, while the second line installs (/in) the new printer %NEWPRINTER%, and the final line sets the new printer as default (/y)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lejordet.com/2010/08/script-to-add-a-network-printer-automatically-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Active Directory user GUID</title>
		<link>http://www.lejordet.com/2010/07/active-directory-user-guid/</link>
		<comments>http://www.lejordet.com/2010/07/active-directory-user-guid/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 13:26:36 +0000</pubDate>
		<dc:creator>Lars Erik Jordet</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[quick]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[ad]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[ps]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.lejordet.com/?p=106</guid>
		<description><![CDATA[PowerShell oneliner to get AD user GUID]]></description>
			<content:encoded><![CDATA[<p>I found 
<a  href="http://msgoodies.blogspot.com/2008/02/get-active-directory-object-guid-one.html" onclick="javascript:pageTracker._trackPageview('/external/msgoodies.blogspot.com/2008/02/get-active-directory-object-guid-one.html');" >this page</a> which contains an old oneliner to get a user GUID in PowerShell &#8211; but sadly it doesn&#8217;t work anymore.</p>
<p>After some tricking around, I found the following to work:</p>
<div class="codecolorer-container powershell blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="powershell codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000;">&#40;</span><span style="color: #008080; font-weight: bold;">new-object</span> Guid<span style="color: #000000;">&#40;</span><span style="color: pink;">,</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span>directoryservices.directorysearcher<span style="color: #000000;">&#93;</span> <span style="color: #800000;">&quot;(samaccountname=theuser)&quot;</span><span style="color: #000000;">&#41;</span>.findall<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">0</span><span style="color: #000000;">&#93;</span>.properties<span style="color: #000000;">&#91;</span><span style="color: #800000;">&quot;objectguid&quot;</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>.ToString<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.lejordet.com/2010/07/active-directory-user-guid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MS Dynamics CRM installation: ASP.NET 2.0 is not installed</title>
		<link>http://www.lejordet.com/2010/07/ms-dynamics-crm-installation-asp-net-2-0-is-not-installed/</link>
		<comments>http://www.lejordet.com/2010/07/ms-dynamics-crm-installation-asp-net-2-0-is-not-installed/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 12:46:22 +0000</pubDate>
		<dc:creator>Lars Erik Jordet</dc:creator>
				<category><![CDATA[quick]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[.net2.0]]></category>
		<category><![CDATA[dynamics]]></category>
		<category><![CDATA[IIS6]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.lejordet.com/?p=109</guid>
		<description><![CDATA[What to do if MS Dynamics CRM installation reports "ASP.NET 2.0 is not installed" after you've installed .NET 4.0]]></description>
			<content:encoded><![CDATA[<p>I got this error message on a server while installing Dynamics. At first I thought the problem was that my IIS is running 64 bit .NET 2.0 (I&#8217;ve had problems with that in the past), but it turns out that the actual problem is that .NET 4.0 was installed.</p>
<p>
<a  href="http://crm.vdsnickt.eu/2010/05/ms-crm-4-0-setup-error-asp-net-is-not-installed/" onclick="javascript:pageTracker._trackPageview('/external/crm.vdsnickt.eu/2010/05/ms-crm-4-0-setup-error-asp-net-is-not-installed/');" >This guy</a> figured out what the problem is: The installer checks for a specific filter in the IIS settings, which doesn&#8217;t exist when .NET 4.0 has been installed.</p>
<p>I&#8217;ll repeat the fix here, hopefully making this a bit more &#8220;discoverable&#8221; by search engines (searching the exact error message gave me nothing helpful, just tips about running <span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">aspnet_regiis.exe -i <span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">repeatedly):</span></span></p>
<p>In IIS Manager, right click Web Sites, and select Properties.</p>
<p>Under ISAPI Filters, Add a new filter you call ASP.NET_2.0.50727, pointing to C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_filter.dll (assuming 64 bit server, otherwise substitute Framework for Framework64).</p>
<p>Dynamics should now install without issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lejordet.com/2010/07/ms-dynamics-crm-installation-asp-net-2-0-is-not-installed/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>&#8220;Couldn&#8217;t generate the upgrade script.&#8221; for version C.0.8.40 of MS SQL Reporting Services</title>
		<link>http://www.lejordet.com/2010/07/couldnt-generate-the-upgrade-script-for-version-c-0-8-40-of-ms-sql-reporting-services/</link>
		<comments>http://www.lejordet.com/2010/07/couldnt-generate-the-upgrade-script-for-version-c-0-8-40-of-ms-sql-reporting-services/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 08:51:42 +0000</pubDate>
		<dc:creator>Lars Erik Jordet</dc:creator>
				<category><![CDATA[quick]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[mssql2005]]></category>
		<category><![CDATA[win32]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.lejordet.com/?p=104</guid>
		<description><![CDATA[The error message &#8220;Couldn&#8217;t generate the upgrade script&#8221; pops up during configuration of Reporting Services for MS SQL Server 2005, if you install reporting services after installing a service pack &#8211; in my case Reporting Services was installed as SP1, while the main SQL Server 2005 install was updated to SP3. Reinstalling SQL Server 2005 SP3 [...]]]></description>
			<content:encoded><![CDATA[<p>The error message &#8220;Couldn&#8217;t generate the upgrade script&#8221; pops up during configuration of Reporting Services for MS SQL Server 2005, if you install reporting services after installing a service pack &#8211; in my case Reporting Services was installed as SP1, while the main SQL Server 2005 install was updated to SP3.</p>
<p>Reinstalling 
<a  href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ae7387c3-348c-4faa-8ae5-949fdfbe59c4&amp;displaylang=en" onclick="javascript:pageTracker._trackPageview('/external/www.microsoft.com/downloads/details.aspx');" >SQL Server 2005 SP3</a> fixed it.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.lejordet.com%2F2010%2F07%2Fcouldnt-generate-the-upgrade-script-for-version-c-0-8-40-of-ms-sql-reporting-services%2F&amp;title=%E2%80%9CCouldn%E2%80%99t%20generate%20the%20upgrade%20script.%E2%80%9D%20for%20version%20C.0.8.40%20of%20MS%20SQL%20Reporting%20Services" id="wpa2a_4"><img src="http://www.lejordet.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.lejordet.com/2010/07/couldnt-generate-the-upgrade-script-for-version-c-0-8-40-of-ms-sql-reporting-services/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mercurial module for Python 2.6/Win32</title>
		<link>http://www.lejordet.com/2010/06/mercurial-module-for-python-2-6win32/</link>
		<comments>http://www.lejordet.com/2010/06/mercurial-module-for-python-2-6win32/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 09:44:43 +0000</pubDate>
		<dc:creator>Lars Erik Jordet</dc:creator>
				<category><![CDATA[compiling]]></category>
		<category><![CDATA[packages]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[hg]]></category>
		<category><![CDATA[mercurial]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[python2.6]]></category>
		<category><![CDATA[trac]]></category>
		<category><![CDATA[win32]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.lejordet.com/?p=102</guid>
		<description><![CDATA[Precompiled Mercurial 1.5.4 for Python 2.6]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve compiled Mercurial 1.5.4 for Python 2.6, following 
<a  href="http://mercurial.selenic.com/wiki/WindowsInstall" onclick="javascript:pageTracker._trackPageview('/external/mercurial.selenic.com/wiki/WindowsInstall');" >this guide</a>, and uploaded it here, since I guess it&#8217;ll be useful for later:</p>
<p>
<a  href="/files/python/mercurial-1.5.4.win32-py2.6.exe" onclick="javascript:pageTracker._trackPageview('/downloads/files/python/mercurial-1.5.4.win32-py2.6.exe');" >mercurial-1.5.4.win32-py2.6.exe</a></p>
<p>I use it for 
<a  href="http://trac.edgewall.org" onclick="javascript:pageTracker._trackPageview('/external/trac.edgewall.org');" >Trac 0.12</a> in a multi-repository setting, so we can keep our old SVN repo while having some of the larger projects on Hg.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lejordet.com/2010/06/mercurial-module-for-python-2-6win32/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a Trac install work on Apache 2.2/Python 2.6/win32, 2010 edition</title>
		<link>http://www.lejordet.com/2010/01/making-a-trac-install-work-on-apache-2-2python-2-6win32-2010-edition/</link>
		<comments>http://www.lejordet.com/2010/01/making-a-trac-install-work-on-apache-2-2python-2-6win32-2010-edition/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 11:14:25 +0000</pubDate>
		<dc:creator>Lars Erik Jordet</dc:creator>
				<category><![CDATA[windows]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[python2.6]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[trac]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://www.lejordet.com/?p=98</guid>
		<description><![CDATA[A year ago making Trac work on Python 2.6/win32 was a lot of work, including having to compile your own Python SVN bindings. This is an update of that old article assuming the usage of pre-built PySVN bindings.]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight: normal;">About 10 months ago I wrote a 
<a  href="http://www.lejordet.com/2009/03/making-a-trac-install-work-on-apache-22python-26win32/">short article</a> on getting 
<a title="Trac"  href="http://trac.edgewall.org/" onclick="javascript:pageTracker._trackPageview('/external/trac.edgewall.org/');" >Trac</a> to work on Python 2.6 and Windows. Recently I updated the install, and took a look at how the situation is now.</span></p>
<p>This guide assumes you have a working install of Trac on Python 2.5/mod_python/Apache2.2 already, as described in the 
<a  href="http://trac.edgewall.org/wiki/TracInstall" onclick="javascript:pageTracker._trackPageview('/external/trac.edgewall.org/wiki/TracInstall');" >Trac install guide</a>, and that 
<a  href="http://www.python.org/download/releases/2.6.4/" onclick="javascript:pageTracker._trackPageview('/external/www.python.org/download/releases/2.6.4/');" >Python 2.6</a> is installed.</p>
<p>What needs to be done:</p>
<ul>
<li>Install Python 2.6 and Trac for 2.6</li>
<li>Build a new version of mod_python</li>
<li>Optionally Replace Apache DLLs (mostly if you followed my previous guide)</li>
</ul>
<h2>Required software</h2>
<p>You&#8217;ll need 
<a  href="http://www.microsoft.com/express/vc/" onclick="javascript:pageTracker._trackPageview('/external/www.microsoft.com/express/vc/');" >Visual C++ 2008 Express Edition</a> or any retail version of VS 2008 if you want to build your own mod_python for 2.6 (I&#8217;ll provide a precompiled one in this post).</p>
<h2>Preparing</h2>
<p>Install Python 2.6 and 
<a  href="http://trac.edgewall.org/wiki/TracInstall" onclick="javascript:pageTracker._trackPageview('/external/trac.edgewall.org/wiki/TracInstall');" >Trac on 2.6</a> (using &#8220;
<a  href="http://peak.telecommunity.com/DevCenter/EasyInstall#installing-easy-install" onclick="javascript:pageTracker._trackPageview('/external/peak.telecommunity.com/DevCenter/EasyInstall?installing-easy-install');" >easy_install</a> trac&#8221; is recommended)</p>
<p>You&#8217;ll probably also want to easy_install 
<a  href="http://pygments.org/" onclick="javascript:pageTracker._trackPageview('/external/pygments.org/');" >Pygments</a> for source highlighting.</p>
<h2>Building mod_python for 2.6</h2>
<p>This 
<a  href="http://badwords.org/w/Compile_mod_python_for_Python_2.6.1" onclick="javascript:pageTracker._trackPageview('/external/badwords.org/w/Compile_mod_python_for_Python_2.6.1');" >guide to mod_python</a> covers the creation and installation of a compatible version of the module.</p>
<p>At this point, you should be able to restart Apache and load up your &#8220;old&#8221; Trac on Python 2.6, but with the error message that &#8220;svn&#8221; support is not installed.</p>
<p>A pre-built version of this can be found here: 
<a  href="http://vagabonds.info/python/mod_python-3.3.2-dev-20080819.win32-py2.6.exe" onclick="javascript:pageTracker._trackPageview('/external/vagabonds.info/python/mod_python-3.3.2-dev-20080819.win32-py2.6.exe');" >mod_python-3.3.2-dev-20080819.win32-py2.6.exe</a></p>
<h2>Python SVN bindings</h2>
<p>My 
<a  href="http://www.lejordet.com/2009/03/making-a-trac-install-work-on-apache-22python-26win32/">old guide</a> had instructions on how to build these yourself, but after that article was made, 
<a  href="http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100" onclick="javascript:pageTracker._trackPageview('/external/subversion.tigris.org/servlets/ProjectDocumentList');" >&#8220;official&#8221; Python 2.6 bindings</a> have been released.</p>
<p>Most recent version as of this writing is the 
<a  href="http://subversion.tigris.org/files/documents/15/46888/svn-python-1.6.6.win32-py2.6.exe" onclick="javascript:pageTracker._trackPageview('/external/subversion.tigris.org/files/documents/15/46888/svn-python-1.6.6.win32-py2.6.exe');" >SVN 1.6.6 version of the bindings</a>.</p>
<h2>Replacing Apache DLLs to make libsvn work</h2>
<p><em>Note: Only use these instructions if you experience problems, and/or you&#8217;re running a self-built version of the Python SVN bindings already.</em></p>
<p>There&#8217;s a slight difference between libapr-1.dll as supplied with Apache 2.2 and the one we built together with libsvn, so 
<a  href="http://trac.edgewall.org/ticket/6739#comment:9" onclick="javascript:pageTracker._trackPageview('/external/trac.edgewall.org/ticket/6739?comment:9');" >the fix</a> is to replace the one in your Apache2.2\bin folder with the one from your Python2.6\Lib\site-packages\libsvn folder (copy the libsvn_*.dlls from the same folder into the Apache2.2\bin folder if you still get problems).</p>
<p>Restarting Apache now should make Trac work fully, with Subversion support.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lejordet.com/2010/01/making-a-trac-install-work-on-apache-2-2python-2-6win32-2010-edition/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>lxml for Python 2.6/win32</title>
		<link>http://www.lejordet.com/2009/12/lxml-for-python26-win32/</link>
		<comments>http://www.lejordet.com/2009/12/lxml-for-python26-win32/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 12:03:35 +0000</pubDate>
		<dc:creator>Lars Erik Jordet</dc:creator>
				<category><![CDATA[packages]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[python2.6]]></category>
		<category><![CDATA[win32]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.lejordet.com/?p=95</guid>
		<description><![CDATA[A pre-built statically linked lxml 2.2.4 for Windows/Python 2.6]]></description>
			<content:encoded><![CDATA[<p>A quick post today: Using 
<a  href="http://codespeak.net/lxml/build.html" onclick="javascript:pageTracker._trackPageview('/external/codespeak.net/lxml/build.html');" >these instructions</a>, I&#8217;ve built a statically linked lxml 2.2.4 for Windows.</p>
<p>I used the following versions of the libraries:</p>
<div class="codecolorer-container python blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">STATIC_INCLUDE_DIRS <span style="color: #66cc66;">=</span> <span style="color: black;">&#91;</span><br />
<span style="color: #483d8b;">&quot;..<span style="color: #000099; font-weight: bold;">\\</span>libxml2-2.7.6.win32<span style="color: #000099; font-weight: bold;">\\</span>include&quot;</span><span style="color: #66cc66;">,</span><br />
<span style="color: #483d8b;">&quot;..<span style="color: #000099; font-weight: bold;">\\</span>libxslt-1.1.26.win32<span style="color: #000099; font-weight: bold;">\\</span>include&quot;</span><span style="color: #66cc66;">,</span><br />
<span style="color: #483d8b;">&quot;..<span style="color: #000099; font-weight: bold;">\\</span>zlib-1.2.3.win32<span style="color: #000099; font-weight: bold;">\\</span>include&quot;</span><span style="color: #66cc66;">,</span><br />
<span style="color: #483d8b;">&quot;..<span style="color: #000099; font-weight: bold;">\\</span>iconv-1.9.2.win32<span style="color: #000099; font-weight: bold;">\\</span>include&quot;</span><br />
<span style="color: black;">&#93;</span></div></td></tr></tbody></table></div>
<div class="codecolorer-container python blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">STATIC_LIBRARY_DIRS <span style="color: #66cc66;">=</span> <span style="color: black;">&#91;</span><br />
<span style="color: #483d8b;">&quot;..<span style="color: #000099; font-weight: bold;">\\</span>libxml2-2.7.6.win32<span style="color: #000099; font-weight: bold;">\\</span>lib&quot;</span><span style="color: #66cc66;">,</span><br />
<span style="color: #483d8b;">&quot;..<span style="color: #000099; font-weight: bold;">\\</span>libxslt-1.1.26.win32<span style="color: #000099; font-weight: bold;">\\</span>lib&quot;</span><span style="color: #66cc66;">,</span><br />
<span style="color: #483d8b;">&quot;..<span style="color: #000099; font-weight: bold;">\\</span>zlib-1.2.3.win32<span style="color: #000099; font-weight: bold;">\\</span>lib&quot;</span><span style="color: #66cc66;">,</span><br />
<span style="color: #483d8b;">&quot;..<span style="color: #000099; font-weight: bold;">\\</span>iconv-1.9.2.win32<span style="color: #000099; font-weight: bold;">\\</span>lib&quot;</span><br />
<span style="color: black;">&#93;</span></div></td></tr></tbody></table></div>
<p>Download it here: 
<a  href="/files/python/lxml-2.2.4.win32-py2.6.exe" onclick="javascript:pageTracker._trackPageview('/downloads/files/python/lxml-2.2.4.win32-py2.6.exe');" >lxml-2.2.4.win32-py2.6</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lejordet.com/2009/12/lxml-for-python26-win32/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
