<?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>richard-slater.co.uk &#187; Sys. Admin.</title>
	<atom:link href="http://www.richard-slater.co.uk/archives/category/sys-admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.richard-slater.co.uk</link>
	<description>Jesus, Life, Programming and Systems Administration</description>
	<lastBuildDate>Fri, 16 Jul 2010 21:04:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>ASP.net 3.5 GridView RowCommand event fired twice</title>
		<link>http://www.richard-slater.co.uk/archives/2010/04/01/asp-net-3-5-gridview-rowcommand-event-fired-twice/</link>
		<comments>http://www.richard-slater.co.uk/archives/2010/04/01/asp-net-3-5-gridview-rowcommand-event-fired-twice/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:25:27 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sys. Admin.]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=763</guid>
		<description><![CDATA[I am writing this up to hopefully save someone else time in the future, this particular problem took up six hours of my day yesterday causing quite a bit of frustration for me, as the developer, and the users of the application. If you are searching for the solution scroll down to the bottom of [...]]]></description>
			<content:encoded><![CDATA[<p>I am writing this up to hopefully save someone else time in the future, this particular problem took up six hours of my day yesterday causing quite a bit of frustration for me, as the developer, and the users of the application.</p>
<p>If you are searching for the solution scroll down to the bottom of the page where I will outline the solution I used to resolve the problem. It is also worth pointing out that this does appear to be fixed in .NET 4. Certainly I was able to consistently reproduce the problem with VS2008/.NET 3.5 on multiple different computers. However after converting the project to VS2010/.NET 5 I haven&#8217;t seen the issue.</p>
<h1>Explanation of the problem</h1>
<p>I wrote and maintain an application that publishes a list of courses and allows users to book onto these courses, what I have listed below is a simplified version of this application.</p>
<p>The administration console contains two lists:</p>
<ul>
<li><strong>Published Courses</strong> &#8211; courses visible to all employees.</li>
<li><strong>Unpublished Courses </strong>- courses waiting to be published, only visible from the administration console.</li>
</ul>
<p>Courses can be freely published (i.e. moved from Unpublished to Published) by clicking green tick. Courses that have not had any bookings made can be unpublished by clicking the red cross.</p>
<p>The cross and the tick are implemented as <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.aspx">GridView</a> <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.buttonfield.aspx">ButtonFields</a>:</p>
<pre>
</pre>
<pre><code>&lt;asp:ButtonField ButtonType="Image" CommandName="UnpublishCourse"
</code><code>    ImageUrl="~/images/unpublish.png" InsertVisible="False" Text="Unpublish" /&gt;
</code></pre>
<p><a href="http://www.richard-slater.co.uk/wp-content/uploads/2010/04/CourseBookings1.png"><img class="aligncenter size-medium wp-image-765" title="CourseBookings" src="http://www.richard-slater.co.uk/wp-content/uploads/2010/04/CourseBookings1-300x114.png" alt="" width="300" height="114" /></a></p>
<p>This application has been running for six months, the issue had not been observed up until yesterday. The user explained to me that when they were publishing courses they were always published in pairs, equally when unpublishing courses it was being done in pairs, concealingly unpublishing a course with bookings.</p>
<h1>Investigating the problem</h1>
<p>Initially I tried to reproduce this on my local machine, backed up and subsequently restored the database locally made sure I was running the same revision as the server and fired it up. Couldn&#8217;t reproduce the problem, no matter how fast I clicked it wouldn&#8217;t happen. Tried various permutations of code and database but could only reproduce on the server.</p>
<p>Refreshed the binaries on the server with the HEAD from subversion, problem was still happening most of the time. I confirmed that it wasn&#8217;t an issue with the stored procedures by running them manually through LinqPad.</p>
<p>I started putting debug statements at the entry points to the critical parts of the code, this yielded an interesting output on my development machine, each time the cross or the tick was clicked UnpublishedGridView_RowCommand was fired twice. This gave me something to search for, seems I am not the only one to have this problem, <a href="https://connect.microsoft.com/VisualStudio/feedback/details/102115/gridview-rowcommand-event-firing-twice">Microsoft tried to reproduce it in 2006</a> but couldn&#8217;t.</p>
<h1>Solving the problem</h1>
<p>As it turns out there are several ways of fixing the problem, several people have used timers to <a href="http://www.labbookpages.co.uk/electronics/debounce.html">&#8220;debounce&#8221;</a> the RowCommand event, assuming that the event is always going to be fired twice a session variable can be used to filter out the second event.</p>
<p>Because the event is only fired twice when ButtonType=&#8221;Image&#8221; not when ButtonType=&#8221;Link&#8221; you can set the text property to the HTML to render your image. This resulted in the code above becomming:</p>
<pre>
</pre>
<pre><code>&lt;asp:ButtonField ButtonType="Link" CommandName="UnpublishCourse"
</code><code>    InsertVisible="False" Text="&lt;img src=images/unpublish.png /&gt;" /&gt;
</code></pre>
<p>This proved to be the simplest possible solution, Visual Studio 2008 throws a warning about ASP.net validation, but I can live with that as long as the application works. In addition to the simplicity of the solution it also continues to work in ASP.net 4 (which doesn&#8217;t exhibit the double event behaviour).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2010/04/01/asp-net-3-5-gridview-rowcommand-event-fired-twice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OneNote vs Evernote</title>
		<link>http://www.richard-slater.co.uk/archives/2010/02/27/onenote-vs-evernote/</link>
		<comments>http://www.richard-slater.co.uk/archives/2010/02/27/onenote-vs-evernote/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 20:11:33 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[Misc.]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sys. Admin.]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=734</guid>
		<description><![CDATA[Somewhere in the middle of 2007 I was encouraged to use OneNote to clear my desk and move to a &#8220;paperless&#8221; system, initially this was a little painful as it seemed a gargantuan task to scan in all of the bits of paper on and around my desk that appeared to contain useful information. As [...]]]></description>
			<content:encoded><![CDATA[<p>Somewhere in the middle of 2007 I was encouraged to use <a class='wikipedia' href='http://en.wikipedia.org/wiki/OneNote' title='Wikipedia article on OneNote'>OneNote</a> to clear my desk and move to a &#8220;paperless&#8221; system, initially this was a little painful as it seemed a gargantuan task to scan in all of the bits of paper on and around my desk that appeared to contain useful information.</p>
<p>As it turned out I realised that if a bit of paper was covered by another (or in fact covered by anything) it wasn&#8217;t that important to the execution of my role and could probably be thrown in the bin.</p>
<p>At the time I was not using Microsoft Office at home, opting to use <a class='wikipedia' href='http://en.wikipedia.org/wiki/OpenOffice' title='Wikipedia article on OpenOffice'>OpenOffice</a> for the limited needs I had for productivity software. I did however want a better way of organising my paperwork at home, OneNote 2007 came in at about £70 which isn&#8217;t unreasonable for what you got. Then I discovered <a class='wikipedia' href='http://en.wikipedia.org/wiki/Evernote' title='Wikipedia article on Evernote'>Evernote</a>.</p>
<p>Seemed perfect, I don&#8217;t generate so much paperwork that I would bust the 40mb/month limit on the free account. In the end I decided to adopt Evernote at home and continue to use OneNote at work, it proved quite a handy separation of work and life.</p>
<p>Recently I have run into two problems that are pushing me towards using Evernote for everything, and ditching OneNote entirely:</p>
<ol>
<li>Evernote handles PDFs really well, you drag them in and they are displayed using the Foxit rendering engine. It just works. OneNote on the other hand plain old embeds them into the note, great now how is that different from having them in a folder in My Documents.</li>
<li>Evernote 3.5 has vastly improved the synchronization mechanism meaning that I can safely put something on Evernote on my PC and it will be on my laptop shortly after it is turned on next. Microsoft has tried to get this kind of functionality into OneNote and <a class='wikipedia' href='http://en.wikipedia.org/wiki/SharePoint' title='Wikipedia article on SharePoint'>SharePoint</a> however it just doesn&#8217;t work that well, it is too slow and there seems to be a 10 minute refresh cycle hard coded into the product.</li>
</ol>
<p>I am still not sure that I want to ditch OneNote entirely, the 2010 version has some nice labour saving devices built in such as quick screen clippings and image formatting with the fluid user interface. Nothing in OneNote 2010 screams &#8220;don&#8217;t leave me&#8221; though.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2010/02/27/onenote-vs-evernote/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Login failed for user &#8221;</title>
		<link>http://www.richard-slater.co.uk/archives/2010/01/25/login-failed-for-user/</link>
		<comments>http://www.richard-slater.co.uk/archives/2010/01/25/login-failed-for-user/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 13:51:41 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Sys. Admin.]]></category>
		<category><![CDATA[Things You Find]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=724</guid>
		<description><![CDATA[There is an excellent post on the SQL Protocols blog about diagnosing the “Login failed for user &#8221;. The user is not associated with a trusted SQL Server connection.” message displayed by SQL Management Studio and other applications which use the same API; Notice the blank username &#8221;. I believe there is one possibility missing [...]]]></description>
			<content:encoded><![CDATA[<p>There is an <a href="http://blogs.msdn.com/sql_protocols/archive/2008/05/03/understanding-the-error-message-login-failed-for-user-the-user-is-not-associated-with-a-trusted-sql-server-connection.aspx">excellent post</a> on the SQL Protocols blog about diagnosing the <em>“Login failed for user &#8221;. The user is not associated with a trusted SQL Server connection.”</em> message displayed by SQL Management Studio and other applications which use the same API; Notice the blank username &#8221;.</p>
<p>I believe there is one possibility missing from the above post: that is the Group Policy setting &#8220;Deny access to this computer from the network&#8221;. Which can be found in both Domain Group Policy and Local Security Policy in the following path:</p>
<p><em>Computer Configuration » Windows Settings » Security Settings » Local Policies » User Rights Assignment.</em></p>
<p>I have been using this policy more and more to lockdown access to site systems in accordance with our security and access policy. It pays to be cautious when applying User Rights Assignment policies to a machine, as in Windows 2003/XP they are not very granular.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2010/01/25/login-failed-for-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Card Reader on Acer Aspire 5100 Series Under Windows 7</title>
		<link>http://www.richard-slater.co.uk/archives/2009/10/26/card-reader-on-acer-aspire-5100-serie-under-windows-7/</link>
		<comments>http://www.richard-slater.co.uk/archives/2009/10/26/card-reader-on-acer-aspire-5100-serie-under-windows-7/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 20:24:56 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Sys. Admin.]]></category>
		<category><![CDATA[Driver]]></category>
		<category><![CDATA[Laptop]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=693</guid>
		<description><![CDATA[Important Update (16/11/2009): there seems to be a problem with these drivers causing a crash. I am going to experiment further with this laptop and try and diagnose the cause of the problem and hopefully find a solution. I am typing this on my Acer Aspire 5102WLMi which is one of the popular (if flawed) [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>Important Update (16/11/2009): there seems to be a problem with these drivers causing a crash. I am going to experiment further with this laptop and try and diagnose the cause of the problem and hopefully find a solution.</strong></span></p>
<p>I am typing this on my Acer Aspire 5102WLMi which is one of the popular (if flawed) Acer Aspire 5100 series; I rescued this one from the Balconi Test by putting a bit of rubber (it was a cut down rubber foot) on top of the <a class='wikipedia' href='http://en.wikipedia.org/wiki/Southbridge_%28computing%29' title='Wikipedia article on Southbridge_(computing)'>South Bridge</a> chip set, that however is not the story I am telling today.</p>
<p>I never bothered to install the Card Reader driver on this laptop while I was running the Windows 7 Beta, mainly because I am lazy, but also I didn&#8217;t have a need for it so it never came up. With the release of Windows 7 I wanted to get the system perfect, seeing as hopefully it will last a good year in it&#8217;s present state, and I wanted to be able to re-arrange the SD card from my Acer PDA.</p>
<p>Windows 7 x64 was unable to identify a driver for this particular card reader, this left me with three unknown devices in Device Manager:</p>
<p><img class="alignnone size-full wp-image-696" title="Missing Drivers Acer 5100" src="http://www.richard-slater.co.uk/wp-content/uploads/2009/10/MissingDriversAcer5100.png" alt="Missing Drivers Acer 5100" width="215" height="94" /></p>
<p>The Acer website was a bust, as far as Acer are concerned this laptop won&#8217;t even run Vista x64, so I had to dig deeper. From past experience of looking for drivers without using Windows Update I knew that I could probably identify the manufacturer from the Hardware and Device ID&#8217;s available through Device Manager. If you want to follow along here are the steps:</p>
<ol>
<li>Open up Device Manager (Right Click &#8220;Computer&#8221;, Choose &#8220;Manage&#8221;, Select &#8220;Device Manager&#8221;)</li>
<li>Identify your unknown devices (They will look similar to the image above, although the text will differ)</li>
<li>Right click one of them and select &#8220;Properties&#8221;</li>
<li>Switch to the &#8220;Details&#8221; tab</li>
<li>Change the property drop down box to read &#8220;Hardware Ids&#8221;</li>
</ol>
<p>What that will give you is one or more strings looking something like this</p>
<pre>PCI\VEN_<strong>1524</strong>&amp;DEV_<strong>0530</strong>&amp;SUBSYS_009F1025&amp;REV_01</pre>
<p>I have marked the two important parts in bold, the four digits after &#8220;VEN_&#8221; tell you the <a class='wikipedia' href='http://en.wikipedia.org/wiki/Conventional_PCI' title='Wikipedia article on Conventional_PCI'>PCI</a> Vendor number, the four digits after &#8220;DEV_&#8221; tells you device number these two numbers should uniquely identify the driver.</p>
<p>There are several sites that allow you to lookup these numbers, I tend to use the publicly available PCI Vendor and Device Lists at <a href="http://www.pcidatabase.com/">PCIDatabase.com</a>. Which has always given me good results with minimum fuss and adverts.</p>
<p>Armed with the above I identified the manufacturer of the Card Reader was ENE Technologies, sometimes this is all you need to find the driver. You can Google/Bing the name and click the download or support links and get the latest drivers. This isn&#8217;t always the way, as some <a class='wikipedia' href='http://en.wikipedia.org/wiki/Original_equipment_manufacturer' title='Wikipedia article on Original_equipment_manufacturer'>OEMs</a> don&#8217;t offer drivers leaving that down to the system integrator to offer that service.</p>
<p>So some time with Bing, I found some drivers for various ENE Devices, however the drivers available from <a href="http://www.versiontracker.com/dyn/moreinfo/win/115639">VersionTracker</a> seemed promising. After downloading and unzipping the contents of the file to a folder on my Desktop, I was able to point Device Manager at these files for each of the unknown devices I was left with three working devices and a fully operational Card Reader.</p>
<p><img class="alignnone size-full wp-image-695" title="ENECardReaderDriversAcer5100" src="http://www.richard-slater.co.uk/wp-content/uploads/2009/10/ENECardReaderDriversAcer5100.png" alt="ENECardReaderDriversAcer5100" width="386" height="113" /></p>
<p>Hope this helps some other people with similar laptops or Card Readers, post in the comments with your experiences, please include the manufacturer and model of the laptop/netbook you have succeeded with and hopefully you will help someone else with the same devices.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2009/10/26/card-reader-on-acer-aspire-5100-serie-under-windows-7/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Change your MTU under Vista or Windows 7</title>
		<link>http://www.richard-slater.co.uk/archives/2009/10/23/change-your-mtu-under-vista-or-windows-7/</link>
		<comments>http://www.richard-slater.co.uk/archives/2009/10/23/change-your-mtu-under-vista-or-windows-7/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 20:11:31 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Sys. Admin.]]></category>
		<category><![CDATA[Netsh]]></category>
		<category><![CDATA[TCP/IP]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=683</guid>
		<description><![CDATA[This information is available in many many other places, however I am putting it on here because I know it will be here for me to refer to. Also it is handy, as I know I can access my web-site even if the MTU is misconfigured. For some reason that has escaped me Path MTU [...]]]></description>
			<content:encoded><![CDATA[<p><em>This information is available in many many other places, however I am putting it on here because I know it will be here for me to refer to. Also it is handy, as I know I can access my web-site even if the <a class='wikipedia' href='http://en.wikipedia.org/wiki/Maximum_transmission_unit' title='Wikipedia article on Maximum_transmission_unit'>MTU</a> is misconfigured.</em></p>
<p>For some reason that has escaped me <a class='wikipedia' href='http://en.wikipedia.org/wiki/Path_MTU_discovery' title='Wikipedia article on Path_MTU_discovery'>Path MTU Discovery</a> in Windows just doesn&#8217;t seem to figure out the MTU for a given path (something to do with routers being poorly configured to not respond to <a class='wikipedia' href='http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol' title='Wikipedia article on Internet_Control_Message_Protocol'>ICMP</a> requests). So Windows uses the default. For the most part this doesn&#8217;t affect anyone, however if it dos affect you, it really annoys you. Failure of PMTUD will result in some websites not loading correctly, having trouble connecting to normally reliable online services and general Internet weirdness.</p>
<p>The resolution is to set your default MTU to one lower than the <a class='wikipedia' href='http://en.wikipedia.org/wiki/Ethernet' title='Wikipedia article on Ethernet'>Ethernet</a> default of 1500. Here is how:</p>
<p><strong>Step 1: Find your MTU</strong><br />
From an elevated CMD Shell enter the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">netsh interface ipv4 show subinterfaces</pre></div></div>

<p>You should get something like this</p>
<pre>MTU         MediaSenseState  Bytes In    Bytes Out  Interface
----------  ---------------  ---------   ---------  -------------
4294967295  1                0           13487914   Loopback Pseudo-Interface 1
1500        1                3734493902  282497358  Local Area Connection</pre>
<p>If you are using Ethernet cable you will be looking for &#8220;Local Area Connection&#8221; or &#8220;Local Area Connection 2&#8243; (if you happened to plug into the second network port). If you are using Wireless you will be looking for &#8220;Wireless Network Connection&#8221;. The MTU is in the first column.</p>
<p><strong>Step 2: Find out what it should be</strong></p>
<p>In the CMD shell type:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">ping www.cantreachthissite.com -f -l <span style="color: #cc66cc;">1472</span></pre></div></div>

<p>The host name should be a site you <span style="text-decoration: underline;"><strong>can not</strong></span> reach, -f marks the packet as one that should not be fragmented the -l 1472 sets the size of the packet (1472 = Ethernet Default MTU &#8211; Packet Header, where the Ethernet Default MTU is 1500 and the Packet Header is 28 bytes)</p>
<p>If the packet can&#8217;t be sent because it would need to be fragmented you will get something similar to this:</p>
<pre>Packet needs to be fragmented but DF set.</pre>
<p>Keep trying lower packet sizes by 10 (i.e. -l 1460, 1450, 1440, etc.) until you get a successful ping request. Raise your packet sizes by one until you get a &#8220;Packet needs to be fragmented but DF set.&#8221;. The last successful value plus 28 will be your MTU value.</p>
<p>In my case a packet size of 1430 succeeds but 1431 fails, so 1430 + 28 = 1458.</p>
<p><strong>Step 3: Set your MTU</strong></p>
<p>Now you have identified the interface you need to change and the ideal MTU for you, now it is time to make the change. Again from an elevated CMD Shell type the following replacing my MTU of 1458 with your own value:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">netsh interface ipv4 <span style="color: #b1b100; font-weight: bold;">set</span> <span style="color: #448844;">subinterface &quot;Local Area Connection&quot; mtu</span>=<span style="color: #cc66cc;">1458</span> store=persistent</pre></div></div>

<p>Or if you are using a Wireless connection:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">netsh interface ipv4 <span style="color: #b1b100; font-weight: bold;">set</span> <span style="color: #448844;">subinterface &quot;Wireless Network Connection&quot; mtu</span>=<span style="color: #cc66cc;">1458</span> store=persistent</pre></div></div>

<p>If all has gone well you should have a perfectly working internet connection.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2009/10/23/change-your-mtu-under-vista-or-windows-7/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Music to Install Windows By</title>
		<link>http://www.richard-slater.co.uk/archives/2009/10/22/music-to-install-windows-by/</link>
		<comments>http://www.richard-slater.co.uk/archives/2009/10/22/music-to-install-windows-by/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 20:12:06 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[Sys. Admin.]]></category>
		<category><![CDATA[Vampire Weekend]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=673</guid>
		<description><![CDATA[Windows 7 turned up in the post today. The red box is Visual Studio 2008 which is there to show that the boxes have a similar profile to the old style hard cases. I have been running the Beta since it was first available to the general public, and I have had Windows 7 Business [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-674 alignleft" title="Windows 7 Home Premium" src="http://www.richard-slater.co.uk/wp-content/uploads/2009/10/Windows7HomePremium-268x300.jpg" alt="Windows 7 Home Premium" width="268" height="300" />Windows 7 turned up in the post today. The red box is Visual Studio 2008 which is there to show that the boxes have a similar profile to the old style hard cases.</p>
<p>I have been running the Beta since it was first available to the general public, and I have had Windows 7 Business at work for a couple of weeks now. Bought Windows 7 Home Premium for about £45 from Tesco. One copy for the main PC which I will probably re-build at Christmas and one copy for the laptop which is re-built now. <a href="http://www.hanselman.com/blog/">Scott Hanselman</a> described Vista as an operating system that stabs you in the eye a thousand different ways, I would have to agree with that. Windows 7 is different, things work how you think they should and don&#8217;t seem to randomly break when you least expect it.</p>
<p>As for the title of this blog post, I have mostly been installing Windows 7 to <a href="http://open.spotify.com/album/6Jhr0EbCw2ue3V50dQYeYg">Vampire Weekend</a> which Kev introduced me to. The track M79 seems to have taken some inspiration from the Sailor&#8217;s Hornpipe better known as the Blue Peter theme tune, seems to cut off just at the moment I am expecting it to carry on into the main part of the music. Maybe there is a Mike Oldfield link in addition to the lyrical Peter Gabriel link.</p>
<p>If I am moved to over the course of the next couple of week I shall try and point out some of the new features available in Windows 7 that are cool. For the time being try the following hold down Alt, while still holding down Alt press &#8220;Alt Gr&#8221; (The other side of the space bar) then press Tab. For some reason you get the old XP style Alt-Tab window. Utterly pointless?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2009/10/22/music-to-install-windows-by/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding VSeWSS 1.3 Solutions to Source Control</title>
		<link>http://www.richard-slater.co.uk/archives/2009/02/05/vsewss-13-solutions-to-source-control/</link>
		<comments>http://www.richard-slater.co.uk/archives/2009/02/05/vsewss-13-solutions-to-source-control/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 10:35:12 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sys. Admin.]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=556</guid>
		<description><![CDATA[Having done a little experimenting with Visual Studio Extensions for WSS (VSeWSS), I wanted to start actually developing features for our intranet site. I try and add everything that is even slightly important into source control (Subversion). VSeWSS creates normal looking solutions, however when you deploy your project to a SharePoint site it created an [...]]]></description>
			<content:encoded><![CDATA[<p>Having done a little experimenting with Visual Studio Extensions for WSS (VSeWSS), I wanted to start actually developing features for our intranet site. I try and add everything that is even slightly important into source control (Subversion). VSeWSS creates normal looking solutions, however when you deploy your project to a SharePoint site it created an additional directory alongside &#8220;bin&#8221; and &#8220;obj&#8221; called &#8220;pkg&#8221;.</p>
<p>This &#8220;pkg&#8221; folder contains the manifest.xml, soloution.xml and feature.xml files that are used to create the feature to be deployed into SharePoint. Initially I was including this folder in my commits however, I noticed that any tweaks made to feature.xml were overwritten when you deployed the package again. After some searching around I came across an article that suggests <a href="http://msmvps.com/blogs/brianmadsen/archive/2008/07/10/error-on-subsequent-deployment-of-web-part-for-vs2008-and-vsewss-1-2.aspx">deleting the &#8220;pkg&#8221; folder under certain circumstances</a>. From this I assume that the contents of the &#8220;pkg&#8221; folder is generated each and every time you package and deploy your solution (or indeed project), thus it does not need to be added to source control.</p>
<p>While writing this post I did come across another blog that <a href="http://oidatsmyleg.wordpress.com/2008/05/20/adding-required-files-vsewss-projects/">suggests adding the &#8220;pkg&#8221; folder to source control</a>. There does appear to be little advice out there regarding VSeWSS and Source Control. I would be interested to hear others experiences on the subject.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2009/02/05/vsewss-13-solutions-to-source-control/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Isolator For SharePoint</title>
		<link>http://www.richard-slater.co.uk/archives/2008/11/25/isolator-for-sharepoint/</link>
		<comments>http://www.richard-slater.co.uk/archives/2008/11/25/isolator-for-sharepoint/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 19:47:15 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Sys. Admin.]]></category>
		<category><![CDATA[Isolator]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=475</guid>
		<description><![CDATA[Typemock are offering their new product for unit testing SharePoint called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to unit test SharePoint without a SharePoint server. To learn more click here. The first 50 bloggers who blog this text in their blog and tell us about [...]]]></description>
			<content:encoded><![CDATA[<p>Typemock are offering their new product for <a href="http://www.typemock.com/sharepointpage.php?utm_source=sp_bb&amp;utm_medium=blog_4sp&amp;utm_campaign=sp_bb">unit testing SharePoint</a> called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to <a href="http://blog.typemock.com/2008/11/newisolatorforsharepointtoolforunittest.html?utm_source=typeblog&amp;utm_medium=sp_bb&amp;utm_campaign=typeblog">unit test SharePoint</a> without a SharePoint server. To learn more <a href="http://www.typemock.com/sharepointpage.php?utm_source=sp_bb&amp;utm_medium=blog_4sp&amp;utm_campaign=sp_bb">click here</a>.</p>
<p><strong>The first 50 bloggers </strong>who blog this text in their blog and tell us about it, will get <span style="color: #ff0000;">a Full Isolator license, Free</span>. for rules and info <a href="http://blog.typemock.com/2008/11/newisolatorforsharepointtoolforunittest.html">click here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2008/11/25/isolator-for-sharepoint/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>5 Commands I Use Every Day</title>
		<link>http://www.richard-slater.co.uk/archives/2008/09/08/5-commands-i-use-every-day/</link>
		<comments>http://www.richard-slater.co.uk/archives/2008/09/08/5-commands-i-use-every-day/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 17:07:48 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Misc.]]></category>
		<category><![CDATA[Sys. Admin.]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Windows 2003]]></category>
		<category><![CDATA[Windows 2008]]></category>
		<category><![CDATA[Windows Vista]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=362</guid>
		<description><![CDATA[For my regular day job I am a Systems Administrator, my team and I manage a network with 7 servers and approximately 600 workstations, 200 laptops and 2500 users. All clients are Windows XP SP2 or SP3 and all servers are Windows 2003 SP2 or Windows 2003 R2 SP2. I am sure I am not alone in knowing [...]]]></description>
			<content:encoded><![CDATA[<p>For my regular day job I am a Systems Administrator, my team and I manage a network with 7 servers and approximately 600 workstations, 200 laptops and 2500 users. All clients are <a class='wikipedia' href='http://en.wikipedia.org/wiki/Windows_XP' title='Wikipedia article on Windows XP'>Windows XP</a> SP2 or SP3 and all servers are <a class='wikipedia' href='http://en.wikipedia.org/wiki/Windows_2003' title='Wikipedia article on Windows 2003'>Windows 2003</a> SP2 or Windows 2003 R2 SP2.</p>
<p>I am sure I am not alone in knowing least 5 commands that I use day in and day out to manage workstations or servers on the network. I thought I would take the time to share some of these with you now.</p>
<p><span id="more-362"></span></p>
<p><strong>dirquota</strong></p>
<p><em>Windows 2003 R2 Only</em></p>
<p><em></em></p>
<p>dirquota is part of Windows 2003 R2 File Server Resource Manager (&#8220;FSRM&#8221;) which I use to manage quotas on home areas and shared folders. dirquota is the command line mechanism for managing the quota portion of FSRM, with the number of users we have it is important that we can modify quotas quickly, something the FSRM Quota GUI is not good at.</p>
<p>There I two basic forms I use every day:</p>
<p><em>dirquota quota list /path:&lt;path&gt;</em></p>
<p>Simply enough this will create a report for the path including peak usage, current usage and quota limit along with dates and times useful when determining what to do with the quota. Usefully the verbs <em>quota </em>and <em>list </em>can be abbreviated to <em>q</em> and <em>l</em> respectively, which saves a bit of typing.</p>
<p>The second form is to modify quotas:</p>
<p><em>dirquota quota modify /path:&lt;path&gt; /limit:&lt;limit&gt;</em></p>
<p>The command does what is expected; modifies the quota on the path to the specific limit. Again the verbs <em>quota </em>and <em>modify </em>can be abbreviated to <em>q </em>and <em>m</em>, in addition the limit parameter can be expressed in units, f.ex, 50MB, 500MB, 1G, 20G.</p>
<p><strong>robocopy</strong></p>
<p><em>All Windows Platforms</em></p>
<p><a class='wikipedia' href='http://en.wikipedia.org/wiki/Robocopy' title='Wikipedia article on Robocopy'>Robocopy</a> (or Robust Copy) is the <a class='wikipedia' href='http://en.wikipedia.org/wiki/Swiss_Army_Knife' title='Wikipedia article on Swiss Army Knife'>Swiss Army Knife</a> of file copy tools while it doesn&#8217;t have a GUI it is more than capable of doing taking on any copy job. Originally part of the Windows Server Resource Kit it is not a standard command in <a class='wikipedia' href='http://en.wikipedia.org/wiki/Windows_Vista' title='Wikipedia article on Windows Vista'>Windows Vista</a> and <a class='wikipedia' href='http://en.wikipedia.org/wiki/Windows_2008_Server' title='Wikipedia article on Windows 2008 Server'>Windows 2008 Server</a>.</p>
<p>Typing &#8220;robocopy /?&#8221; at the command line might be slightly overwhelming however there is one boiler plate command that will do the job.</p>
<p><em>robocopy &lt;source&gt; &lt;destination&gt; /E /ZB /COPY:DAT /R:3 /W:10 /XJ /XF *.tmp ~$*.doc</em></p>
<p>&lt;source&gt; and &lt;destination&gt; can be local paths, mapped drives or UNC paths.</p>
<ul>
<li><em>/E</em> &#8211; copies files and folders recursively including empty folders, if you want to exclude empty folders replace /E with /S.</li>
<li><em>/ZB</em> &#8211; copies files in restartable mode, if that fails due to an access denied error then use backup mode, this will require administrator access to work, use /Z if you are not running as an administrator.</li>
<li><em>/COPY:DAT</em> &#8211; copies only <strong>D</strong>ata, <strong>A</strong>ttributes and <strong>T</strong>imestamps useful when taking a copy to move to a new file system and re-apply permissions from scratch. Check the help pages for information about other options.</li>
<li><em>/R:3 /W:10</em> &#8211; Retry three times, wait 10 seconds between tries. Important if you have an Anti-Virus product configured to scan on access as you may get System Error messages when trying to access these files.</li>
<li><em>/XJ</em> &#8211; Exclude Junction Points. Very important for Windows Vista as the user profile &#8220;Application Data&#8221; folder points to itself causing recursive and eventually failing copy operations.</li>
<li><em>/XF &lt;filespec&gt;</em> &#8211; Exclude Files. There is rarely any point in copying temporary.</li>
</ul>
<p><strong>wuauclt /detectnow</strong></p>
<p><em>All Windows Platforms</em></p>
<p>wuauclt stands for <strong>W</strong>indows <strong>U</strong>pdate <strong>A</strong>utomatic <strong>U</strong>pdate <strong>Cl</strong>ien<strong>t</strong>, yes it is a bit of a mouth full, /detectnow is a simple operation to kick off the Windows Update client to detect if updates are required rather than relying on the detection schedule.</p>
<p><strong>dsquery, dsmove</strong></p>
<p>The Active Directory Users and Computers (ADUC) <a class='wikipedia' href='http://en.wikipedia.org/wiki/Microsoft_Management_Console' title='Wikipedia article on Microsoft Management Console'>Microsoft Management Console</a> Add-on is sufficient for the majority of Active Directory operations. There are situations where it is useful to be able to script an operation, for example the mass moves of objects from one location to another.</p>
<p>I tend to use <a class='wikipedia' href='http://en.wikipedia.org/wiki/Microsoft_Excel' title='Wikipedia article on Microsoft Excel'>Microsoft Excel</a> to to transform a text file report to a list of directory commands, most recently I moved all laptops that had not accessed the domain for the past six weeks to an &#8220;Lost Computers&#8221; OU. At which point I disabled the computer account through ADUC.</p>
<p><em>dsquery computer -name LTA3-44 | dsmove -newparent &#8220;ou=Lost Computers,dc=domain,dc=co,dc=uk&#8221;</em></p>
<p><strong>icacls</strong></p>
<p><em>Windows Vista, Windows 2003 SP2 and Windows 2008 Only</em></p>
<p>icacls is the long awaited replacement to cacls and xcacls providing command line access to modifying Windows <a class='wikipedia' href='http://en.wikipedia.org/wiki/NTFS' title='Wikipedia article on NTFS'>NTFS</a> <a class='wikipedia' href='http://en.wikipedia.org/wiki/Access_Control_Lists' title='Wikipedia article on Access Control Lists'>Access Control Lists</a>. icacls provides more flexibility that cacls and xcacls making it a essential skill to learn for manageing mass permission changes on disks with many different users.</p>
<p><em>icacls /grant DOMAIN\rslater:(OI)(CI)F /T</em></p>
<ul>
<li>/grant DOMAIN\username &#8211; grants the specified permission to this user, /deny is also an option however one to be careful of.</li>
<li> <img src='http://www.richard-slater.co.uk/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> OI)(CI) &#8211; not some strange smiley, but means <strong>O</strong>bject <strong>I</strong>nherit, <strong>C</strong>ontainer <strong>I</strong>nherit, applies only to directories and means files and folders within the folder will inherit permissions from the folder.</li>
<li>/T &#8211; recurse directories.</li>
</ul>
<p><strong>Final Thought</strong></p>
<p>Every Systems Administrator, Programmer, Hacker, Scripter and Helpdesk Operator must have at least 5 commands that make their life easier, if you have posted about these commands on your blog please do leave a link in the comments. Equally if you think of a command while reading this blog entry feel free to post it in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2008/09/08/5-commands-i-use-every-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SMART Notebook File Format</title>
		<link>http://www.richard-slater.co.uk/archives/2008/07/22/smart-notebook-file-format/</link>
		<comments>http://www.richard-slater.co.uk/archives/2008/07/22/smart-notebook-file-format/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 12:48:09 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Sys. Admin.]]></category>
		<category><![CDATA[Things You Find]]></category>
		<category><![CDATA[Inkscape]]></category>
		<category><![CDATA[Notebook]]></category>
		<category><![CDATA[SMART]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=96</guid>
		<description><![CDATA[The SMART .notebook format is simply a zipped set of XML and SVG files, This may be common knowledge but it is certainly the first time I have come across it. To test it you can create a file in SMART Notebook rename the extension from .notebook to .zip, double click to open, you will [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.smarttech.com/notebook">SMART .notebook</a> format is simply a zipped set of <a class='wikipedia' href='http://en.wikipedia.org/wiki/XML' title='Wikipedia article on XML'>XML</a> and <a class='wikipedia' href='http://en.wikipedia.org/wiki/SVG' title='Wikipedia article on SVG'>SVG</a> files, This may be common knowledge but it is certainly the first time I have come across it.</p>
<p>To test it you can create a file in SMART Notebook rename the extension from .notebook to .zip, double click to open, you will be presented with several files named page<em>n</em>.svg where <em>n</em> is a number, as well as a series of other files and folders including settings.xml, preview.png and metadata.xml.</p>
<p>The XML and SVG files can be edited in notepad, or perhaps more useful for the SVG files in a program such as <a href="http://www.inkscape.org/">Inkscape</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2008/07/22/smart-notebook-file-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
