<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Peace For All</title>
	<atom:link href="http://com2kid.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://com2kid.wordpress.com</link>
	<description>Health, College, and Programming Languages.</description>
	<lastBuildDate>Fri, 27 Jan 2012 20:39:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='com2kid.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Peace For All</title>
		<link>http://com2kid.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://com2kid.wordpress.com/osd.xml" title="Peace For All" />
	<atom:link rel='hub' href='http://com2kid.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Beware of the Current Directory when using PowerShell Remoting!</title>
		<link>http://com2kid.wordpress.com/2011/10/18/beware-of-the-current-directory-when-using-powershell-remoting/</link>
		<comments>http://com2kid.wordpress.com/2011/10/18/beware-of-the-current-directory-when-using-powershell-remoting/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 22:04:41 +0000</pubDate>
		<dc:creator>Devlin Bentley</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[current directory]]></category>
		<category><![CDATA[default directory]]></category>
		<category><![CDATA[PowerShell Remoting]]></category>
		<category><![CDATA[WinRM]]></category>

		<guid isPermaLink="false">http://com2kid.wordpress.com/?p=199</guid>
		<description><![CDATA[Are your files appearing in strange places? Or maybe not appearing at all? Does everything work when run locally, but when remoting all of a sudden things work a bit differently? Be aware that when using PowerShell remoting that your working directory may not be what you expect! Create a simple test script that writes [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=199&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Are your files appearing in strange places? Or maybe not appearing at all? Does everything work when run locally, but when remoting all of a sudden things work a bit differently?</p>
<p>Be aware that when using PowerShell remoting that your working directory may not be what you expect!</p>
<p>Create a simple test script that writes out the value of Get-Location to a log file at an absolute path. Run this script remotely to figure out what your actual default location is!</p>
<p>At the top of your scripts it may be a good idea to use Set-Location to make sure your current working directory is what you think it is. This is especially true if you try to access files relative to your script&#8217;s location. (This is good advice anyway!)</p>
<p>Also note that PowerShell tracks its current working directory differently than Windows does. A really good explanation of this exists at <a href="http://huddledmasses.org/powershell-power-user-tips-current-directory/">http://huddledmasses.org/powershell-power-user-tips-current-directory/</a></p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/com2kid.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/com2kid.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/com2kid.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/com2kid.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/com2kid.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/com2kid.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/com2kid.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/com2kid.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/com2kid.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/com2kid.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/com2kid.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/com2kid.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/com2kid.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/com2kid.wordpress.com/199/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=199&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://com2kid.wordpress.com/2011/10/18/beware-of-the-current-directory-when-using-powershell-remoting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24671f0c9ca5f2be0f8adc3a217d9f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Devlin Bentley</media:title>
		</media:content>
	</item>
		<item>
		<title>PowerShell Call Operator (&amp;): Using an array of parameters to solve all your quoting problems</title>
		<link>http://com2kid.wordpress.com/2011/09/25/powershell-call-operator-using-an-array-of-parameters-to-solve-all-your-quoting-problems/</link>
		<comments>http://com2kid.wordpress.com/2011/09/25/powershell-call-operator-using-an-array-of-parameters-to-solve-all-your-quoting-problems/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 15:30:36 +0000</pubDate>
		<dc:creator>Devlin Bentley</dc:creator>
				<category><![CDATA[Life in general]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Call Operator]]></category>

		<guid isPermaLink="false">http://com2kid.wordpress.com/?p=173</guid>
		<description><![CDATA[I would like to thank James Brundage (blog!) for telling me about this. Suffice to say, the man is seriously into automation. Alright, if you just want to learn about using arrays of parameters with the call operator (&#38;) and skip all the explanation of what doesn&#8217;t work, scroll down to the bottom. I am a big [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=173&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I would like to thank <a title="James Brundage" href="http://twitter.com/#!/jamesbru">James Brundage</a> (<a title="blog!" href="http://blog.start-automating.com/">blog</a>!) for telling me about this. Suffice to say, the man is seriously into automation.</p>
<p>Alright, if you just want to learn about using arrays of parameters with the call operator (&amp;) and skip all the explanation of what doesn&#8217;t work, scroll down to the bottom. I am a big believer in understanding solutions though, so this post will detail everything that doesn&#8217;t work and slowly build up towards what does work.</p>
<p>The last blog post I did on this topic was about <a title="PowerShell Tip: Building a command line for execution" href="http://com2kid.wordpress.com/2011/09/21/powershell-tip-building-a-command-line-for-execution/">using Invoke-Expression</a> to solve problems with passing parameters to external programs. I resorted to using Invoke-Expression since (as an undocumented side effect?) Invoke-Expression will strip off quotes from parameters to commands it executes. But in some circles using Invoke-Expression to execute programs is considered heresy. It is thanks to James Brundage that I was able to figure out how to better use &amp; and also come to a greater conscious realization of how PowerShell handles strings.</p>
<p>To summarize the problem, try to get the following to run in PowerShell</p>
<p><pre class="brush: powershell;">
$pingopts = &quot;www.example.com -n 5&quot;
ping $pingopts
</pre></p>
<p>If you run this command <em>ping</em> will spit out an error, the root cause of the problem is that PowerShell passes $pingopts to <em>ping</em> with the quotes still on it, so the above line is the same as typing</p>
<p style="padding-left:30px;">ping &#8220;www.example.com -n 5&#8243;</p>
<p>Which is obviously quite wrong.</p>
<p>The next obvious solution is to use the call operator, &#8220;&amp;&#8221;. The call operator is how you tell PowerShell to basically act as if you had just typed whatever follows into the command line. It is like a little slice of &#8216;&gt;&#8217; in your script.</p>
<p>Now the call operator takes the first parameter passed to it and uses <strong>Get-Command</strong> to try to find out what needs to be done. Without going into details about Get-Command, this means the first parameter to the call operator must be <em>only the command that is to be run, <strong>not including parameters</strong></em>. <a title="powershell.com's explanation of &amp; and single command execution" href="http://powershell.com/cs/blogs/ebook/archive/2009/03/30/chapter-12-command-discovery-and-scriptblocks.aspx#the-call-operator-only-accepts-single-commands">The people over at Powershell.com explain it really well.</a></p>
<p>With all this in mind, let us try the following</p>
<p><pre class="brush: powershell;">
$pingopts = &quot;www.example.com -n 5&quot;
&amp;ping $pingopts
</pre></p>
<p>Run that and you will get the exact same error. Fun!</p>
<h2>Why is this happening?</h2>
<p>The problem is that <strong>&amp; does not dequote strings that have spaces in them</strong>.</p>
<p>So this code works:</p>
<p><pre class="brush: powershell;">
$pingopts = &quot;www.example.com&quot;
&amp;ping $pingopts
</pre></p>
<p>Where as</p>
<p><pre class="brush: powershell;">
$pingopts = &quot;  www.example.com&quot;
&amp;ping $pingopts
</pre></p>
<p>will not.</p>
<p>But if we think about this for a minute, we already know about this behavior. Heck we expect it and rely on it. It is so ingrained into how we use PowerShell that we don&#8217;t even think about it, except for when we run head first into it. So now let us explicitly discuss PowerShell&#8217;s handling of strings.</p>
<h2>String Quoting Logic</h2>
<p>The string auto quoting and dequoting logic is designed around passing paths around. The rule, as demonstrated above, is quite simple. A string with a space in it gets quoted when passed to something outside of PoSH, while a string without spaces in it has its quotes stripped away. This logic basically assumes if you have a space, you are dealing with a path and you need quotes. If you don&#8217;t have a space, you are either dealing with a path that doesn&#8217;t need quotes, or are passing something around that isn&#8217;t a path and you do not want quotes. For those scenarios PowerShell gives exactly the results people want, which just so happen to be the results people need 95% of the time.</p>
<p>Problems arise  when you have strings with spaces in them that you do not want quoted after leaving the confines of PowerShell. Bypassing the string quoting/dequoting logic is not easy and you can end up resorting to Invoke-Expression hacks like I detailed earlier or you can try to find a way to work within the system. The latter is obviously preferable.</p>
<h2>The Solution</h2>
<p>You may have already guessed the solution from the title of this blog post: <span style="text-decoration:underline;">Pass an array of parameters to the call operator.</span> Given the sparse documentation available online for <strong>&amp;</strong> (it would be nice if it said string[] somewhere), one has to have a fairly good understanding of Powershell to figure this out on their own, or just randomly try passing an array to &amp;.</p>
<p>The key here is working the system: by passing parameters in an array you can avoid having spaces in your quoted strings. Where you would normally put a space, you break off and create a separate array element. This is still a bit of a work around, it would be optimal to find a way to tell &amp; to dequote strings, but this solution does work.</p>
<p>Code:</p>
<p><pre class="brush: powershell;">
$pingopts = @(&quot;www.example.com&quot;, &quot;-n&quot;, 5)
&amp;ping $pingopts
</pre></p>
<p>Again, notice instead of &#8220;-n 5&#8243;, I split it into two array elements.</p>
<p>Just for reference, here is how you would build that command up line by line using an array:</p>
<p><pre class="brush: powershell;">
$pingopts = @()
$pingopts += &quot;www.example.com&quot;
$pingopts += &quot;-n&quot;
$pingopts += 5
&amp;ping $pingopts
</pre></p>
<p>This actually is not much different from constructing 3 separate variables and passing them in after ping:</p>
<p><pre class="brush: powershell;">
$param1 = &quot;www.example.com&quot;
$param2 = &quot;-n&quot;
$param3 = 5
&amp;ping $param1 $param2 $param3
</pre></p>
<p>Which is the blatantly obvious solution but also the ugly one so I never even considered it. Of course using arrays is more flexible since you can declare at top and slowly build up your command line throughout your script.</p>
<p>Hopefully this saves everyone some time and the journey has helped you understand a bit more about Powershell.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/com2kid.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/com2kid.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/com2kid.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/com2kid.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/com2kid.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/com2kid.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/com2kid.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/com2kid.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/com2kid.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/com2kid.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/com2kid.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/com2kid.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/com2kid.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/com2kid.wordpress.com/173/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=173&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://com2kid.wordpress.com/2011/09/25/powershell-call-operator-using-an-array-of-parameters-to-solve-all-your-quoting-problems/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24671f0c9ca5f2be0f8adc3a217d9f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Devlin Bentley</media:title>
		</media:content>
	</item>
		<item>
		<title>Remotely Executing Commands in PowerShell using C#</title>
		<link>http://com2kid.wordpress.com/2011/09/22/remotely-executing-commands-in-powershell-using-c/</link>
		<comments>http://com2kid.wordpress.com/2011/09/22/remotely-executing-commands-in-powershell-using-c/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 00:02:28 +0000</pubDate>
		<dc:creator>Devlin Bentley</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Remoting]]></category>

		<guid isPermaLink="false">http://com2kid.wordpress.com/?p=161</guid>
		<description><![CDATA[At first glance, this seems like it should be easy. After all: remoting using PowerShell is dirt easy! Once the server is configured you are a single Invoke-Command away from remoting bliss! So how hard could it be in C#? Surely there is some functional equivalent to Invoke-Command that gets exposed, right? Well no, it is not that simple. It [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=161&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At first glance, this seems like it should be easy. After all: remoting using PowerShell is dirt easy! Once the server is configured you are a single Invoke-Command away from remoting bliss! So how hard could it be in C#? Surely there is some functional equivalent to Invoke-Command that gets exposed, right?</p>
<p>Well no, it is not that simple. It isn&#8217;t too bad, but the lack of any examples on MSDN makes some aspects of doing this quite literally impossible to figure out if you are using MSDN documentation alone.</p>
<p>Thankfully by piecing together posts from the MSDN Forums it is possible to get something working. Having done just that, I figure I&#8217;d save you all the time and effort.</p>
<h1>Precursor</h1>
<p>Get a reference to System.Management.Automation into your project. The best way to do this is to manually edit the csproj file and add the line</p>
<p style="padding-left:30px;">&lt;Reference Include=&#8221;System.Management.Automation&#8221; /&gt;</p>
<p>Yes this is ghetto. I am not sure why that library is not sitting with the rest of them in the proper location that would get it listed in the &#8220;Add References&#8221; dialog.</p>
<h1>Goal</h1>
<p>Calling in from C# code, execute PowerShell  code on a remote machine.</p>
<h1>Tools</h1>
<p>A bunch of poorly documented object constructors.</p>
<p>The key to getting this all working is to properly construct an instance of <strong>WSManConnectionInfo</strong> and pass that on to the RunspaceFactory.CreateRunspace(..) method.</p>
<h2>Step 1: Constructing a PSCredential</h2>
<p>This step is pretty straight forward. PSCredential has only one constructor, it takes in a username and a SecureString password. The only gotcha is that <strong>u</strong><strong>serName includes domain</strong> if applicable.</p>
<p>Good luck on the SecureString PW part. Doing it properly (e.g. never storing your PW in a string at any step) can take some planning ahead, depending on your situation of course.</p>
<p><pre class="brush: csharp;">
PSCredential remoteMachineCredentials = new PSCredential(domainAndUserName, securePassword);
</pre></p>
<h2> Step 2: Constructing WSManConnectionInfo</h2>
<p>This is the hard part. Mostly because the documentation on how to use this class is so poor, most of it consisting of how to establish a loopback connection to localhost.</p>
<p>With our particular goal in mind, we only really care about one of the overloads:</p>
<p><pre class="brush: csharp;">
public WSManConnectionInfo (
bool useSsl,
string computerName,
 int port,
string appName,
string shellUri,
PSCredential credential
)
</pre></p>
<p>The documentation for this constructor (located at <a href="http://msdn.microsoft.com/en-us/library/dd978670(v=VS.9).aspx">http://msdn.microsoft.com/en-us/library/dd978670(v=VS.9).aspx</a> if you want to read it yourself) has such gems as</p>
<p style="padding-left:30px;"><strong>appName</strong></p>
<p style="padding-left:30px;">The application end point to connect to.</p>
<p>Not very useful.</p>
<p>Lets go over these parameters one by one and look at what each one means.</p>
<p><strong>useSsl &#8211; </strong>Pretty simple, a bool flag indicating if SSL should be used. Highly recommended for use, of course. Note that changing this <em>changes what port number you will be using later on</em></p>
<p><strong>computerName &#8211; </strong>The name of the machine you are connecting to. On local networks, this is just the machine name.</p>
<p><strong>port </strong>- Thanks to the blog post at <a href="http://blogs.msdn.com/b/wmi/archive/2009/07/22/new-default-ports-for-ws-management-and-powershell-remoting.aspx">http://blogs.msdn.com/b/wmi/archive/2009/07/22/new-default-ports-for-ws-management-and-powershell-remoting.aspx</a> we know what port numbers PowerShell remoting uses. <strong>5985 </strong>if you are not using SSL, and <strong>5986</strong> if you are using SSL.</p>
<p><strong>appName </strong>- This should be <strong>&#8220;/wsman&#8221;</strong>. I don&#8217;t know what it is or what other values you can use here, but thanks to the Emeka over on the MSDN forums (thread: <a href="http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/a0e5b23c-b605-431d-a32f-942d7c5fd843">http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/a0e5b23c-b605-431d-a32f-942d7c5fd843)</a> we know that &#8220;/wsman&#8221; will get it working.</p>
<p><strong>shellUri &#8211; </strong>Again, thanks to Emeka we know that this needs to be <strong>&#8220;http://schemas.microsoft.com/powershell/Microsoft.PowerShell&#8221;. </strong>I am not sure what other values are acceptable, but that value does indeed work.</p>
<p><strong>credential &#8211; </strong>Finally we come back to the PSCredential object we constructed earlier. Simple enough.</p>
<h2>Step 3: Creating a Runspace</h2>
<p>We thankfully return back to documented things. After constructing the WSManConnectionInfo just pass that into RunspaceFactory.CreateRunspace(&#8230;) and be done with it.</p>
<h2>Step 4: Putting it all together</h2>
<p><pre class="brush: csharp;">
string shellUri = &quot;http://schemas.microsoft.com/powershell/Microsoft.PowerShell&quot;;
PSCredential remoteCredential = new PSCredential(domainAndUsername, securePW);
WSManConnectionInfo connectionInfo = new WSManConectionInfo(false, remoteMachineName, 5985, &quot;/wsman&quot;, shellUri, remoteCredential)

using ( Runspace runspace = RunspaceFactory.CreateRunspace(connectionInfo) )

{

runspace.Open();

Pipeline pipeline = runspace.CreatePipeline(&quot;&lt;COMMAND TO EXECUTE REMOTELY&gt;&quot;);

var results = pipeline.Invoke();

}

</pre></p>
<p>All in all, not too bad. The sad part it, in terms of figuring out what to do it is easier to create a local runspace and use Invoke-Command on it, but once you know what you are doing, it is only one extra line of code to execute scripts remotely!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/com2kid.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/com2kid.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/com2kid.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/com2kid.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/com2kid.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/com2kid.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/com2kid.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/com2kid.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/com2kid.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/com2kid.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/com2kid.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/com2kid.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/com2kid.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/com2kid.wordpress.com/161/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=161&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://com2kid.wordpress.com/2011/09/22/remotely-executing-commands-in-powershell-using-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24671f0c9ca5f2be0f8adc3a217d9f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Devlin Bentley</media:title>
		</media:content>
	</item>
		<item>
		<title>PowerShell Tip: Building a command line for execution</title>
		<link>http://com2kid.wordpress.com/2011/09/21/powershell-tip-building-a-command-line-for-execution/</link>
		<comments>http://com2kid.wordpress.com/2011/09/21/powershell-tip-building-a-command-line-for-execution/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 00:59:37 +0000</pubDate>
		<dc:creator>Devlin Bentley</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Assemble Command Line]]></category>
		<category><![CDATA[Build Command Line]]></category>
		<category><![CDATA[Execute Commands]]></category>

		<guid isPermaLink="false">http://com2kid.wordpress.com/?p=156</guid>
		<description><![CDATA[Building up command lines in PowerShell<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=156&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Update: This still works best for some scenarios, but learn about <a title="PowerShell Call Operator (&amp;): Using an array of parameters to solve all your quoting problems" href="http://com2kid.wordpress.com/2011/09/25/powershell-call-operator-using-an-array-of-parameters-to-solve-all-your-quoting-problems/">how to use the call operator to do this</a> and work within the system!</p>
<p>So you want to build up a command line to execute some utility. Simple enough right? Lets use ping as an example. Say you want to ping example.com 5 times. Your parameters would look like <strong>www.example.com -n 5</strong>. Append this to the end of ping in PowerShell and off you go, right?</p>
<p><pre class="brush: powershell;">
$pingopts = &quot;www.example.com -n 5&quot;
ping $pingopts
</pre></p>
<p>Run that in PowerShell and you will hit a small problem. Ping will give you an error saying about not being able to find the host <strong>www.example.com -n 5</strong>.</p>
<p>If you examine the command line that is used to execute ping (pick your favorite tool, I chose process monitor!) what is happening becomes quite clear. The command that was executed was this:</p>
<pre style="padding-left:30px;">"C:\Windows\system32\PING.EXE" "www.example.com -n 5"</pre>
<p>The problem is that the string quotes around $pingopts were kept in place. While keeping quotes is useful when passing paths around it is not what you want in most other circumstances. We need to make those quotes go away and thankfully you can use <strong>invoke-expression</strong> to do just that.</p>
<p><pre class="brush: powershell;">
$pingopts = &quot;www.example.com -n 5&quot;
invoke-expression &quot;ping $pingopts&quot;
</pre></p>
<p>This code will work perfectly! If you know of any other solutions please post about them, I am sure there are many ways to solve this problem in PowerShell!</p>
<p>In summary: Generally when working with Powershell Cmdlets you don&#8217;t have to worry about strings, PowerShell and its cmdlets handle quoting and dequoting them them perfectly, but you have to be careful when interfacing with the non-PowersShell world.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/com2kid.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/com2kid.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/com2kid.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/com2kid.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/com2kid.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/com2kid.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/com2kid.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/com2kid.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/com2kid.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/com2kid.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/com2kid.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/com2kid.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/com2kid.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/com2kid.wordpress.com/156/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=156&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://com2kid.wordpress.com/2011/09/21/powershell-tip-building-a-command-line-for-execution/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24671f0c9ca5f2be0f8adc3a217d9f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Devlin Bentley</media:title>
		</media:content>
	</item>
		<item>
		<title>How To Properly Get The Drive Letter of a Mounted VHD in PowerShell</title>
		<link>http://com2kid.wordpress.com/2011/09/09/how-to-properly-get-the-drive-letter-of-a-mounted-vhd-in-powershell/</link>
		<comments>http://com2kid.wordpress.com/2011/09/09/how-to-properly-get-the-drive-letter-of-a-mounted-vhd-in-powershell/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 21:06:33 +0000</pubDate>
		<dc:creator>Devlin Bentley</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[HyperV]]></category>
		<category><![CDATA[VHD]]></category>
		<category><![CDATA[VHDs]]></category>
		<category><![CDATA[WMI]]></category>

		<guid isPermaLink="false">http://com2kid.wordpress.com/?p=142</guid>
		<description><![CDATA[There are multiple ways to get the drive letter of a mounted VHD in PowerShell. The most common way is to enumerate all drive letters, mount a VHD, enumerate all drive letters again, and find out which new drive letters have appeared. This strategy is NOT safe and will break down if you have more than [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=142&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are multiple ways to get the drive letter of a mounted VHD in PowerShell. The most common way is to enumerate all drive letters, mount a VHD, enumerate all drive letters again, and find out which new drive letters have appeared. This strategy is NOT safe and will break down if you have more than one program or instance of your script trying to use this method at the same time.</p>
<p>The reason why it isn&#8217;t safe is quite obvious. Assume you have a machine with just one active drive at start, &#8220;C&#8221;.</p>
<ol>
<li><span style="color:#ff0000;">Script 1 enumerates all drives, gets back a list {&#8220;C&#8221;}</span></li>
<li>Script 1 mounts VHD1, VHD1 is assigned drive letter &#8220;D&#8221;.</li>
<li><span style="color:#0000ff;">Script 2 enumerates all drives, gets back a list {&#8220;C&#8221;, &#8220;D&#8221;}</span></li>
<li>Script 2 mounts VHD2, VHD2 is assigned drive letter &#8220;E&#8221;.</li>
<li><span style="color:#ff0000;">Script 1 enumerates all drives, gets back a list {&#8220;C&#8221;, &#8220;D&#8221;, &#8220;E&#8221;}</span></li>
</ol>
<p>At this point Script 1 is not sure which drive belongs to the VHD it mounted. If you have a <strong>UNIQUE</strong> volume name, great! You can do select based on volume name and you are in luck.</p>
<p>If you don&#8217;t though, you have ran into the limitations of this technique.</p>
<p>But there is a better way!</p>
<p>Credit goes out to the <a title="Powershell Management Library for HyperV" href="http://pshyperv.codeplex.com/" target="_blank">PowerShell Management Library for HyperV</a>. They do it properly!</p>
<p>First thing to know is that VHDs are mounted as virtual SCSI Disks. A virtual SCSI Disk can be uniquely identified by a combination of LUN, SCSI Target ID and SCSI Port. Our basic strategy is going to be mapping from Mounted VHD path to a Virtual SCSI Disk and then digging into that Disk object to find out what drive letter it has.</p>
<p>So lets break out some WMI shall we?</p>
<p><pre class="brush: powershell;">

# Given the full path to an already mounted VHD and the name of a volume on it,
# returns the drive letter that VHD was mounted to
function GetDriveLetterOfMountedVHD($FullPathToVHD, $VolumeName)
{
   $MountedDiskImage = Get-WmiObject -Namespace root\virtualization -query &quot;SELECT * FROM MSVM_MountedStorageImage WHERE Name ='$($VHDPath.Replace(&quot;\&quot;, &quot;\\&quot;))'&quot;
   $Disk = Get-WmiObject -Query (&quot;SELECT * FROM Win32_DiskDrive &quot; +
        &quot;WHERE Model='Msft Virtual Disk SCSI Disk Device' AND ScsiTargetID=$($MountedDiskImage.TargetId) &quot; +
        &quot;AND   ScsiLogicalUnit=$($MountedDiskImage.Lun)   AND ScsiPort=$($MountedDiskImage.PortNumber)&quot; )
    $Partitions = $Disk.getRelated(&quot;Win32_DiskPartition&quot;)
    $LogicalDisks = $Partitions | foreach-object{$_.getRelated(&quot;win32_logicalDisk&quot;)}
    $DriveLetter = ($LogicalDisks | where {$_.VolumeName -eq $VolumeName}).DeviceID
    return $DriveLetter
}

</pre></p>
<p>The key thing to notice here is that you are asking WMI for a MountedStorageImage based on <em>the full path of the VHD you mounted</em>. This guarantees that you are not conflicting with any other script&#8217;s VHD activities. All the info returned to you is only about the VHD you mounted.</p>
<p>The rest of the function is pretty straight forward. It can actually all be done in one line but I expanded it out here for clarity.</p>
<ol>
<li>Using the knowledge you have about the MountedDiskImage&#8217;s assigned Virtual SCSI info, get a Win32 Disk Drive by searching on the matching LUN, TargetID and SCSI Port</li>
<li>Get a list of partitions on that disk.</li>
<li>Get a list of logical disks (the things you see in My Computer) associated with each partition</li>
<li>Return the drive letter of the volume that you want.</li>
</ol>
<p>Now if your logical disks happen to have identical volume labels you can index into $LogicalDisks and pick out which one you want that way, and so long as you don&#8217;t go rearranging partititions in your VHD that may work just fine. In addition, you can replace the last where {$_.VolumeName -eq &#8230;} bit with something unique to your situation (Size, FileSystem, etc).</p>
<p>One final note, due to the use of the virtualization WMI namespace, this code will only work on Windows Servers that have the Hyper-V Role installed. With the announcement that Wndows 8 is getting Hyper-V I am hopeful that the WMI virtualization namespace will become available to client OSs as well!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/com2kid.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/com2kid.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/com2kid.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/com2kid.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/com2kid.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/com2kid.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/com2kid.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/com2kid.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/com2kid.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/com2kid.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/com2kid.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/com2kid.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/com2kid.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/com2kid.wordpress.com/142/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=142&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://com2kid.wordpress.com/2011/09/09/how-to-properly-get-the-drive-letter-of-a-mounted-vhd-in-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24671f0c9ca5f2be0f8adc3a217d9f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Devlin Bentley</media:title>
		</media:content>
	</item>
		<item>
		<title>No I am not going to blog about my cats</title>
		<link>http://com2kid.wordpress.com/2011/01/16/no-i-am-not-going-to-blog-about-my-cats/</link>
		<comments>http://com2kid.wordpress.com/2011/01/16/no-i-am-not-going-to-blog-about-my-cats/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 07:46:36 +0000</pubDate>
		<dc:creator>Devlin Bentley</dc:creator>
				<category><![CDATA[Life in general]]></category>

		<guid isPermaLink="false">http://com2kid.wordpress.com/?p=137</guid>
		<description><![CDATA[Yes I have two kitties, no I am not going to turn this into a blog about weird things cats do. That is what Facebook status updates are for. (yes they are cute)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=137&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Yes I have two kitties, no I am not going to turn this into a blog about weird things cats do. That is what Facebook status updates are for.</p>
<p>(yes they are cute)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/com2kid.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/com2kid.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/com2kid.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/com2kid.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/com2kid.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/com2kid.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/com2kid.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/com2kid.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/com2kid.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/com2kid.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/com2kid.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/com2kid.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/com2kid.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/com2kid.wordpress.com/137/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=137&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://com2kid.wordpress.com/2011/01/16/no-i-am-not-going-to-blog-about-my-cats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24671f0c9ca5f2be0f8adc3a217d9f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Devlin Bentley</media:title>
		</media:content>
	</item>
		<item>
		<title>The commoditization of the Smartphone Market</title>
		<link>http://com2kid.wordpress.com/2010/09/21/the-commoditization-of-the-smartphone-market/</link>
		<comments>http://com2kid.wordpress.com/2010/09/21/the-commoditization-of-the-smartphone-market/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 18:43:48 +0000</pubDate>
		<dc:creator>Devlin Bentley</dc:creator>
				<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://com2kid.wordpress.com/?p=128</guid>
		<description><![CDATA[MS was trying to get Smartphone OEMS to go down the commoditization road for years, to turn the smartphone market into a race for the bottom in terms of prices, Google came along and did it better.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=128&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>(Note:  I am no longer an employee of Microsoft nor am I in any way at presently related to either Windows Phone or Windows Mobile.  All opinions expressed here are mine and mine alone.)</p>
<p>A Nokia Executive recently said that phone manufacturers using Android is &#8220;<a href="http://www.dailytech.com/article.aspx?newsid=19682">Like peeing in your pants to stay warm</a>.&#8221;  The implication there being that over the long-term the manufacturers are just hurting themselves.</p>
<p>He is correct.</p>
<p>In the long-term, using Android or Windows Phone is a doomed strategy for the phone manufacturers.  The executives of these companies (HTC, Motorola) know this, but they really have no other choice.</p>
<p>For many years now Microsoft has been trying to repeat their successful desktop business strategy in the smartphone market.  As a quick refresher, their desktop strategy was quite simple: </p>
<ol>
<li>Make a highly usable desirable OS, licence it to computer OEMs to sell with their machines.  This means all computers sold by different manufacturers will be, to a large extent, identical underneath the lable.  Minor HW differences aside, consumers will desire a &#8220;Windows&#8221; computer. </li>
<li>Competition between manufacturers will drive down price, thereby increasing the number of people who can afford to buy a computer, encouraging more manufacturers to enter the market, further driving down prices.  Rinse, wash, repeat, after about two decades an entry-level computer now costs $200.</li>
</ol>
<p>If you are an OEM though, there is a nasty side effect: The profit margin on a new computer is almost $0.  On lower priced machines those annoying sponsored apps that come pre-installed are often the only way companies like Dell and HP make a profit at all.</p>
<p>Initially things weren&#8217;t so bad.  Companies such as Dell and HP had a healthy profit margin.  It was when the first round of drastic price cuts hit in around 1999 that you saw companies like Gateway<a name="noteref1" href="#note1">[1]</a> pretty much cannibalize themselves to stay alive.</p>
<p>Microsoft has been trying to apply this same strategy to the smartphone market for nearly a decade now.  When the smartphone OEMs looked at what happened to Dell and Gateway, and then looked at Microsoft&#8217;s offer to take Windows Mobile to the masses, they basically said &#8220;no thanks&#8221;.   OEMs put the minimal effort needed into selling Windows Mobile to business customers and they never dedicated the resources to it that Microsoft was hoping they would.  After Palm&#8217;s initial dropping out of the smartphone market, OEMs stopped competing at all.  Hardware, prices, screen size, resolution, all stayed the same for years. This pleased the OEMs, Smartphones stayed a niche <strong>high margin</strong> market, being bought by businesses and tech enthusiasts.  Eventually an excuse for the static growth of the Smartphone market appeared: &#8220;Consumers do not want to buy smartphones&#8221;. Eventually both the OEMs and many within Microsoft started to believe in this excuse.</p>
<p>Apple changed all of that.  Apple demonstrated that you can sell Smartphones to everyday consumers, and pretty much mint money in the process. On some of the earlier iPhones Apple was making over $200 profit per phone sold.  That type of profit margin on technology is just insane.</p>
<p>What happened next was predictable. Everybody starting ramping up Smartphone manufacturing.  Unlike Apple, they are using commodity OSes, either Android, or Windows Phone.</p>
<p>And now they are all doomed.</p>
<p>Right now smartphone OEMs are competing on features.  Resolution, processor speed, memory, storage, camera resolution, screen quality, are all increasing while prices are staying the same.  Phone OEMs are desperate for new features to add to justify keeping prices up, just look at all the buzz about dual core ARM processors that are &#8220;coming soon&#8221;.  But no matter how hard the OEMs struggle, prices will begin to fall as features level off. </p>
<p>And the history of the PC market will finally repeat itself.</p>
<p>Microsoft has been working towards this for years.  You have a bunch of really smart people who see the potential of technology, and they have been trying to get that technology out to the masses for over a decade now.  Apple demonstrated that the market is there, Google came along with a shinier OS that is popular right now, but no matter which company ends up winning the mobile handset OS race the overall lesson is that history is going to repeat itself. Prices are going to drop, and OEMs are going to have smaller and smaller margins on handsets.</p>
<p>The phone OEMs know this.  They don&#8217;t want it to happen.  The smarter executives see the writing on the wall and are making money off it while they can, the foolish ones may actually believe the current state of affairs (having a profit margin to speak of) is going to last.  It won&#8217;t. </p>
<p>As for Apple?</p>
<p>After a brief flare of massive profitability they will once again fade to being a niche player.  History repeats itself.  They cannot maintain their insane profit margins for much longer, once features level off Android and Windows Phones are going to start to drive down the average cost of smartphones. Apple will either have to lower their prices to compete or once again become relegated to being a high-class luxury brand.</p>
<p><a name="note1" href="#noteref1">[1]</a> In the mid 1990s Gateway had a reputation for having the best customer service, something I can personally attest to.  My $2000 Gateway computer came with in-house tech support, when something broke a tech guy came and swapped the broken part out. When the price cuts hit Gateway pretty much destroyed their customer service reputation, it has taken them many years to rebuild it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/com2kid.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/com2kid.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/com2kid.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/com2kid.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/com2kid.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/com2kid.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/com2kid.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/com2kid.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/com2kid.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/com2kid.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/com2kid.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/com2kid.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/com2kid.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/com2kid.wordpress.com/128/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=128&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://com2kid.wordpress.com/2010/09/21/the-commoditization-of-the-smartphone-market/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24671f0c9ca5f2be0f8adc3a217d9f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Devlin Bentley</media:title>
		</media:content>
	</item>
		<item>
		<title>Focus Bracketing On My Consumer Digicam</title>
		<link>http://com2kid.wordpress.com/2009/07/28/focus-bracketing-on-my-consumer-digicam/</link>
		<comments>http://com2kid.wordpress.com/2009/07/28/focus-bracketing-on-my-consumer-digicam/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 00:16:57 +0000</pubDate>
		<dc:creator>Devlin Bentley</dc:creator>
				<category><![CDATA[Life in general]]></category>

		<guid isPermaLink="false">http://com2kid.wordpress.com/?p=122</guid>
		<description><![CDATA[So long story short, I installed CHDK on my $300 Canon digicam (SD880).  I only get 1mm control over focus, but it still allowed me to produce this cool picture: I put it together using the free CombineZP application.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=122&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So long story short, I installed <a title="CHDK" href="http://chdk.wikia.com/wiki/CHDK" target="_self">CHDK</a> on my $300 Canon digicam (SD880).  I only get 1mm control over focus, but it still allowed me to produce this cool picture:</p>
<div id="attachment_124" class="wp-caption alignnone" style="width: 560px"><a href="http://com2kid.files.wordpress.com/2009/07/rectangle_new-out999981.jpg"><img class="size-full wp-image-124" title="WinCE Dev Board" src="http://com2kid.files.wordpress.com/2009/07/rectangle_new-out999981.jpg" alt="WinCE Dev Board" width="550" height="427" /></a><p class="wp-caption-text">WinCE Dev Board</p></div>
<p>I put it together using the free <a href="http://www.hadleyweb.pwp.blueyonder.co.uk/CZP/News.htm" target="_self">CombineZP</a> application.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/com2kid.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/com2kid.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/com2kid.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/com2kid.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/com2kid.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/com2kid.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/com2kid.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/com2kid.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/com2kid.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/com2kid.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/com2kid.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/com2kid.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/com2kid.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/com2kid.wordpress.com/122/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=122&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://com2kid.wordpress.com/2009/07/28/focus-bracketing-on-my-consumer-digicam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24671f0c9ca5f2be0f8adc3a217d9f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Devlin Bentley</media:title>
		</media:content>

		<media:content url="http://com2kid.files.wordpress.com/2009/07/rectangle_new-out999981.jpg" medium="image">
			<media:title type="html">WinCE Dev Board</media:title>
		</media:content>
	</item>
		<item>
		<title>My New PC</title>
		<link>http://com2kid.wordpress.com/2009/07/11/my-new-pc/</link>
		<comments>http://com2kid.wordpress.com/2009/07/11/my-new-pc/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 11:17:12 +0000</pubDate>
		<dc:creator>Devlin Bentley</dc:creator>
				<category><![CDATA[Hardware Review]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://com2kid.wordpress.com/2009/07/11/my-new-pc/</guid>
		<description><![CDATA[Waiting for Brown On days like today I think UPS is worse than Santa for one single reason:&#160; Santa does not taunt you with a tracking number. Yes, Friday was a day spent waiting for UPS to come and delivery goodies in boxes, boxes containing many parts, and with much assembly required. Though personally I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=114&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>Waiting for Brown</h3>
<h1></h1>
<p>On days like today I think UPS is worse than Santa for one single reason:&#160; Santa does not taunt you with a tracking number.</p>
<p>Yes, Friday was a day spent waiting for UPS to come and delivery goodies in boxes, boxes containing many parts, and with much assembly required.</p>
<p>Though personally I happen to think that the end result looks rather good</p>
<p><a href="http://com2kid.files.wordpress.com/2009/07/frontofcasepoweroff.jpg"><img style="border-bottom:0;border-left:0;display:block;float:none;margin-left:auto;border-top:0;margin-right:auto;border-right:0;" title="Front of Case Power Off" border="0" alt="Front of Case Power Off" src="http://com2kid.files.wordpress.com/2009/07/frontofcasepoweroff_thumb.jpg?w=366&#038;h=484" width="366" height="484" /></a> </p>
<p> <a href="http://com2kid.files.wordpress.com/2009/07/devlinspcbuild20090421.jpg"><img style="border-bottom:0;border-left:0;display:block;float:none;margin-left:auto;border-top:0;margin-right:auto;border-right:0;" title="Devlin&#39;s PC Build 2009 042" border="0" alt="Devlin&#39;s PC Build 2009 042" src="http://com2kid.files.wordpress.com/2009/07/devlinspcbuild2009042_thumb1.jpg?w=644&#038;h=476" width="644" height="476" /></a>
<p>But getting there was not as easy as it should have been.</p>
<p>Of course, where are my manners, first the technical specs for those of you who care.</p>
<h3>Geek Specs</h3>
<p><strong>CPU</strong>: AMD Phenom II X4 905e 2.50GHZ <font size="1">(energy efficient 65 watt version of the quad core 2.5GHZ Phenom II)</font>     <br /><strong>Motherboard</strong>: Asus M4A78-EM MicroATX    <br /><strong>Video Card</strong>: HIS ATI HD4850    <br /><strong>RAM</strong>:&#160; 8GB DDR2 PC1033    <br /><strong>Primary HD</strong>: OCZ Vertex 64GB SSD drive.     <br /><strong>Secondary HD</strong>: 250GB drive from previous machine     <br /><strong>Case</strong>: NZXT Rogue MicroATX Silver (Brush Aluminum)     <br /><strong>Power Supply</strong>: Some crazy Antec unit I probably paid way to much for     <br /><strong>OS</strong>: Windows 7 RC</p>
<p>Naturally everything except the power supply and OS was purchased on <a href="http://www.newegg.com">Newegg.com</a>.</p>
<p>Until about half an hour after first boot I thought the SSD drive was a waste of money.&#160; Since then I have had continuous issues involving picking my jaw up off of the floor.</p>
<h1></h1>
<h3>NZXT Rogue Review</h3>
<p>This is, no doubt about it, a very lovely case.&#160; On sale for $80, it was a very affordable, lovely case.&#160; Of course three days after I bought one <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16811146046">its sale price</a> has been dropped by $10 down to $70 but such is life in the world of technology.&#160; My CPU is also $5 cheaper now.&#160; <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In spite of its good looks, this case, as many of the Newegg reviews hint at, has some issues.</p>
<h4>Getting the Case Apart</h4>
<p>I have never had to remove so many screws to get a case apart.&#160; It must have been around 10 screws total to get to the hard drive cage.&#160; This also counts removing the motherboard tray, since builds with this case must be done in a very particular order or else you will find yourself stuck.</p>
<p>In the past I have built many computers where the hard drive/CD-ROM drive mounting cage eloquently popped out of the case, I slide my drives in, threw on some screws, and popped the cage back into the case, and went on my way.&#160; This case is nothing like that.</p>
<p>Granted few MicroATX cases allow removal of the drive cage once other components are in place, but even so a removable drive cage would have shaved at least an hour, if not even more, off of how long it took to do the initial installation of components into this case.</p>
<h4>The 1 Hour DVD-ROM Drive Install</h4>
<p>Let me put a disclaimer in here and say that I have built many, many, PCs.&#160; I have done quite a few years of lab work at various times in my life, in addition to building PCs at home. Going at a good clip and after I get into the rhythm of things, in an hour I could install a dozen plus DVD-ROM drives.</p>
<p>This case aims to adjusts one’s expectations in a rather downward direction.</p>
<p>I am guessing that my DVD-RW drive just so happened to be a fraction of a millimeter too wide to fit when using the included drive rails.&#160; Abandoning the rails I tried to screw the drive in, but the screws that had secured the drive in its previous case would not reach due to the layer of sound dampening material that lines all the drive enclosures.&#160; All the drive enclosures are a little wider than normal to make room for the sound dampening material, so normal mounting screws do not reach.</p>
<p>If you add together how long it took me to unscrew my way to the drive cage and how much pushing and shoving I had to do to get the drive into place, it was at least an hour to get a single DVD drive installed.&#160; It was immediately after declaring success that I noticed NZXT’s included bag of &quot;”CD-ROM screws” happened to be a bit longer than typical 5.25” drive mounting screws, such as the ones I had failed to use.</p>
<p>I have a box of 5.25” drive mounting screws (as a subset of my larger “computer screw box”).&#160; They are all the same <a href="http://en.wikipedia.org/wiki/Screw_thread#Lead.2C_pitch.2C_and_number_of_starts">thread pitch</a>, same length.&#160; The screws used in this case are not.&#160; I can’t fault NZXT for having sound dampening material in their case, quite cases are good cases, but unusual screws are, well, unusual.</p>
<h4>Tin Foil Motherboard Tray</h4>
<p>If the metal used for the Motherboard tray was any thinner, it would qualify as tin foil.&#160; I do not think I have ever seen a piece of any computer case that was so easily deformed, and I have repaired a lot of cut rate computers. The thinness of the metal was quite surprising given that</p>
<h4>This Thing Weighs a Ton</h4>
<p>Ok not a ton, but the case does weigh around 20 pounds.&#160; Much to the amusement of reviewers, NZXT advertises it as a portable LAN party case.&#160; Thankfully I did not buy it with any intentions of taking it to LAN parties, but the included carrying strap (carrying harness?) is all the more hilarious for thoughts of what would happen to anyone’s back if they pretended that this case was portable in any sense of the word except for “not nailed down”.</p>
<p>To make it clear, I am not criticizing the case for its weight.&#160; I wanted a case made of brushed aluminum and I got it, and I am much more pleased with it than I am with the “brushed aluminum door cover” style case that I purchased previously.</p>
<p>However I do find it amusing that my MicroATX based computer, weighing in at 31LBs total, feels like it is just a few pounds shy of my full tower case, which has yet to be formally weighed.</p>
<p>Seriously, this case is unexpectedly heavy.&#160; I am still not quite accustom to the idea of such a small computer weighing so much.</p>
<h4>More Complaints about Assembly</h4>
<p>This would be a really good case if assembly wasn’t so evil.&#160; Of course not that many cube’s have a total of five 3.5” bays, (four internal, one with an external facing), but actually installing anything into the drive cage is a very convoluted process.&#160; A good example of this is how installing any 5.25” device first requires removing any installed 3.5” devices, as can be clearly seen in one of Newegg’s promotional shots:</p>
<p> <a href="http://com2kid.files.wordpress.com/2009/07/nzxtcubeneweggdrivebays1.jpg"><img style="display:inline;" title="NZXT Cube Newegg Drive Bays" alt="NZXT Cube Newegg Drive Bays" src="http://com2kid.files.wordpress.com/2009/07/nzxtcubeneweggdrivebays_thumb1.jpg?w=640&#038;h=431" width="640" height="431" /></a>
<p>Notice 3.5” drives are mounted vertically next to the 5.25” bays.</p>
<p>Thankfully I read the manual first which clearly warns users to install any 5.25” drives first.</p>
<p>Speaking of the manual, the pictures are either so poorly taken or poorly printed as to be universally too dark and it is indistinguishable which part of the case is being shown in any of the (far too few) photos.</p>
<h4>Lots of Bags</h4>
<p>Many bags of screws, all very well labeled.&#160; Awesome job on this.</p>
<h4>What’s Up With The Fans?</h4>
<p>None of the chassis fans use smart fan plugs, instead they all opt for Molex.&#160; I can understand the fans with LEDs perhaps needing more power, but the side fans could stand to have proper speed controlled monitored plugs on them.&#160; Although I must admit one very awesome thing about the fans is that</p>
<h4>The Fans Have Filters</h4>
<p><a href="http://com2kid.files.wordpress.com/2009/07/fanfilter.jpg"><img style="display:inline;border-width:0;" title="Fan Filter on Side Case Panel" border="0" alt="Fan Filter on Side Case Panel" src="http://com2kid.files.wordpress.com/2009/07/fanfilter_thumb.jpg?w=644&#038;h=470" width="644" height="470" /></a> (repeat for other side panel)</p>
<p>Except for, you know, the huge fan in back which just has a standard useless grill</p>
<p><a href="http://com2kid.files.wordpress.com/2009/07/rearcasefan.jpg"><img style="display:inline;border-width:0;" title="Rear Case Fan" border="0" alt="Rear Case Fan" src="http://com2kid.files.wordpress.com/2009/07/rearcasefan_thumb.jpg?w=644&#038;h=484" width="644" height="484" /></a> </p>
<p>If the 3 included case fans are not enough, it is possible to install 2 more fans, 1 on each side of the case.</p>
<p>Well it would be, almost. </p>
<h4>Where Are The Rest Of My Washers?</h4>
<p><a href="http://com2kid.files.wordpress.com/2009/07/casesidefanwashers.jpg"><img style="display:inline;border-width:0;" title="Case Side Fan Washers" border="0" alt="Case Side Fan Washers" src="http://com2kid.files.wordpress.com/2009/07/casesidefanwashers_thumb.jpg?w=304&#038;h=363" width="304" height="363" /></a></p>
<p>NZXT installs filters on the two spare fan slots, but only includes enough washers for one more fan.&#160; This confuses me a bit.</p>
<h4>Other Build Issues</h4>
<p>My front USB ports are busted</p>
<p><a href="http://com2kid.files.wordpress.com/2009/07/brokenfrontusb.jpg"><img style="display:inline;border-width:0;" title="Broken Front USB" border="0" alt="Broken Front USB" src="http://com2kid.files.wordpress.com/2009/07/brokenfrontusb_thumb.jpg?w=304&#038;h=404" width="304" height="404" /></a> </p>
<p>The top port does not work at all, Window’s does not recognize when something is plugged into it, while anything plugged into the bottom port results in the error “A USB Device Has Malfunctioned…”</p>
<p>Yes, I’m a little pissed about this.&#160; Come on folks.&#160; 20 lbs of brushed aluminum and you skimp out on the build quality of the front USB ports?&#160; Even the internal header is flimsy! (Admittedly in my experience internal USB headers on cases are always rather flimsy.)</p>
<p>The plastic top window also looks like a layer of it is peeling away</p>
<p><a href="http://com2kid.files.wordpress.com/2009/07/topwindowpeeling.jpg"><img style="display:inline;border-width:0;" title="Top Window Peeling" border="0" alt="Top Window Peeling" src="http://com2kid.files.wordpress.com/2009/07/topwindowpeeling_thumb.jpg?w=484&#038;h=364" width="484" height="364" /></a> </p>
<p>I apologize for the quality of the picture.&#160; Apparently to my digital camera the case’s top window is just slightly more reflective than a mirror.</p>
<p>It actually looks a fair bit worse in person.&#160; At first I thought it was another protective layer of plastic wrap, but it is something internal to the plastic window itself.</p>
<p>Neither of these issues is going to get me to RMA the case, mostly because of how hard it is to put together.</p>
<h3>Other Thoughts</h3>
<p>I have no internal cable running skills</p>
<p><a href="http://com2kid.files.wordpress.com/2009/07/internalcablenest.jpg"><img style="display:inline;border-width:0;" title="Internal Cable Nest" border="0" alt="Internal Cable Nest" src="http://com2kid.files.wordpress.com/2009/07/internalcablenest_thumb.jpg?w=644&#038;h=484" width="644" height="484" /></a> </p>
<p>This is why I did not want a case with a side window.&#160; <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> &#160; After 20 more minutes of attempts at organizing the cables the situation did not improved by much.</p>
<p>The Motherboard has PCI slots.&#160; I have no clue why.&#160; I would much prefer another PCIe 16x slot so I could put another 4850 in here next year when they’ll be going for $50 a piece.</p>
<p>SSD drives are fast.&#160; I read about it being like “night and day” but of course I didn’t take it seriously.&#160; I do now.</p>
<h3>Overall Performance</h3>
<p><em>REALLY DAMN FAST.</em></p>
<p>Apps install so quickly it is insane.&#160; The system boots so quickly it is crazy.&#160; This BIOS has a “fast on” feature where it can boot to some minimal OS ASUS provides.&#160; This “fast” boot time is 10 seconds.</p>
<p>Why bother when I can wait 15&#160; and be into Windows?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/com2kid.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/com2kid.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/com2kid.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/com2kid.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/com2kid.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/com2kid.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/com2kid.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/com2kid.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/com2kid.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/com2kid.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/com2kid.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/com2kid.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/com2kid.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/com2kid.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=114&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://com2kid.wordpress.com/2009/07/11/my-new-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24671f0c9ca5f2be0f8adc3a217d9f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Devlin Bentley</media:title>
		</media:content>

		<media:content url="http://com2kid.files.wordpress.com/2009/07/frontofcasepoweroff_thumb.jpg" medium="image">
			<media:title type="html">Front of Case Power Off</media:title>
		</media:content>

		<media:content url="http://com2kid.files.wordpress.com/2009/07/devlinspcbuild2009042_thumb1.jpg" medium="image">
			<media:title type="html">Devlin&#039;s PC Build 2009 042</media:title>
		</media:content>

		<media:content url="http://com2kid.files.wordpress.com/2009/07/nzxtcubeneweggdrivebays_thumb1.jpg" medium="image">
			<media:title type="html">NZXT Cube Newegg Drive Bays</media:title>
		</media:content>

		<media:content url="http://com2kid.files.wordpress.com/2009/07/fanfilter_thumb.jpg" medium="image">
			<media:title type="html">Fan Filter on Side Case Panel</media:title>
		</media:content>

		<media:content url="http://com2kid.files.wordpress.com/2009/07/rearcasefan_thumb.jpg" medium="image">
			<media:title type="html">Rear Case Fan</media:title>
		</media:content>

		<media:content url="http://com2kid.files.wordpress.com/2009/07/casesidefanwashers_thumb.jpg" medium="image">
			<media:title type="html">Case Side Fan Washers</media:title>
		</media:content>

		<media:content url="http://com2kid.files.wordpress.com/2009/07/brokenfrontusb_thumb.jpg" medium="image">
			<media:title type="html">Broken Front USB</media:title>
		</media:content>

		<media:content url="http://com2kid.files.wordpress.com/2009/07/topwindowpeeling_thumb.jpg" medium="image">
			<media:title type="html">Top Window Peeling</media:title>
		</media:content>

		<media:content url="http://com2kid.files.wordpress.com/2009/07/internalcablenest_thumb.jpg" medium="image">
			<media:title type="html">Internal Cable Nest</media:title>
		</media:content>
	</item>
		<item>
		<title>ZIPing a self extracting ZIP does not make it smaller</title>
		<link>http://com2kid.wordpress.com/2008/07/31/ziping-a-self-extracting-zip-does-not-make-it-smaller/</link>
		<comments>http://com2kid.wordpress.com/2008/07/31/ziping-a-self-extracting-zip-does-not-make-it-smaller/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 18:28:09 +0000</pubDate>
		<dc:creator>Devlin Bentley</dc:creator>
				<category><![CDATA[Stupidity]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://com2kid.wordpress.com/?p=92</guid>
		<description><![CDATA[Stupidity is making me extract your game demo 3 times<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=92&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have been witnessing the stupidity of people putting their self extracting ZIP files into a ZIP file for years now, and it still pisses me off.</p>
<p>If grouping files together then ZIPing them up in &#8220;no compression&#8221; or &#8220;archival&#8221; mode may be useful, but that is it.  A single lone file?  Pointless!  (And yes, I will explain why at the bottom of this post!)</p>
<p>Here is a list of other things that do not belong inside of ZIP files:</p>
<ul>
<li>Any other compresses sound or video file
<ul>
<li>MP3</li>
<li>AVI</li>
<li>MPEG</li>
<li>MPEG2</li>
<li>WMV</li>
<li>etc</li>
</ul>
</li>
<li>Any file already compressed with another compression program
<ul>
<li>JPEGs</li>
<li>RAR files</li>
<li>.ACE files</li>
<li>.7z Files</li>
</ul>
</li>
</ul>
<p>The reason for this is actually easy to understand.</p>
<p>Imagine taking a piece of paper and folding it up really small so you can fit it in a really tiny envelope to mail off.  You fold the paper up as small as you possibly can, and put it in the envelope.  The paper is your original data file and the envelope is the ZIP file.</p>
<p>Now imagine trying to take that envelope with your paper inside of it, already folded up as tight as possible, and putting it inside another envelope.  You cannot fold the paper any more, so nothing is any smaller.  In fact by adding another envelope you have actually made your package larger!  It is only a little bit larger because an extra envelope is not all that thick, but it still is larger.</p>
<p>This is exactly what happens when you try to ZIP a ZIP file, or any other type of already compressed file.  In some cases when you ZIP up a compressed file of some other type (e.g. JPEG) you may save a little bit of space, typically a a kilobyte or two if it is a really huge image that is in the megabyte range, but the time it takes users to open up the ZIP file and hit &#8216;extract&#8217; is longer than it would take them to download the extra few kilobytes.</p>
<p>This seems like only a minor annoyance, but it because a huge pain when some fools who should know better put huge 2GB+ self extracting game demos inside of a ZIP file.  They save maybe one megabyte overall (if even that), but it can take 15-20 minutes to extract their stupid EXE, which then takes another 10-15 minutes to extract the installer.</p>
<p>Bonus points go to the real idiots who do all of the above, and then their installer is itself a single compressed setup.exe when when run then extracts files to a temporary directory before copying them to their final location.</p>
<p>2GB ZIP -&gt; 2GB self extracting EXE -&gt; 2GB Setup.exe -&gt; 2GB temporary files -&gt; 4-5GB installed game</p>
<p>And that is why the tag stupidity is on this post!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/com2kid.wordpress.com/92/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/com2kid.wordpress.com/92/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/com2kid.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/com2kid.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/com2kid.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/com2kid.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/com2kid.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/com2kid.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/com2kid.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/com2kid.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/com2kid.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/com2kid.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/com2kid.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/com2kid.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/com2kid.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/com2kid.wordpress.com/92/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=com2kid.wordpress.com&amp;blog=242270&amp;post=92&amp;subd=com2kid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://com2kid.wordpress.com/2008/07/31/ziping-a-self-extracting-zip-does-not-make-it-smaller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/24671f0c9ca5f2be0f8adc3a217d9f10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Devlin Bentley</media:title>
		</media:content>
	</item>
	</channel>
</rss>
