<?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>SQL Server Sleuth &#187; PowerShell command line(s)</title>
	<atom:link href="http://sqlserversleuth.com/tag/powershell-command-lines/feed/" rel="self" type="application/rss+xml" />
	<link>http://sqlserversleuth.com</link>
	<description>For DBAs that enjoy a good mystery</description>
	<lastBuildDate>Sat, 12 May 2012 15:43:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='sqlserversleuth.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/a9ab64e4b3cc6d92ec2c225a7d6ea0bd?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>SQL Server Sleuth &#187; PowerShell command line(s)</title>
		<link>http://sqlserversleuth.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://sqlserversleuth.com/osd.xml" title="SQL Server Sleuth" />
	<atom:link rel='hub' href='http://sqlserversleuth.com/?pushpress=hub'/>
		<item>
		<title>Using PowerShell to Determine the Windows Installer Version</title>
		<link>http://sqlserversleuth.com/2009/07/08/using-powershell-to-determine-the-windows-installer-version/</link>
		<comments>http://sqlserversleuth.com/2009/07/08/using-powershell-to-determine-the-windows-installer-version/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 17:51:21 +0000</pubDate>
		<dc:creator>tnbarkhouse</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[PowerShell command line(s)]]></category>
		<category><![CDATA[Windows administration]]></category>
		<category><![CDATA[Windows Installer]]></category>

		<guid isPermaLink="false">http://tnbarkhouse.wordpress.com/?p=61</guid>
		<description><![CDATA[I&#8217;m going to attempt a short post&#8230; Sometimes it&#8217;s necessary to determine the version of Windows Installer present on a system. The installation package for new products may be designed to use a feature added to a specific version of &#8230; <a href="http://sqlserversleuth.com/2009/07/08/using-powershell-to-determine-the-windows-installer-version/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqlserversleuth.com&#038;blog=6775699&#038;post=61&#038;subd=tnbarkhouse&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to attempt a short post&#8230;</p>
<p>Sometimes it&#8217;s necessary to determine the version of <a href="http://msdn.microsoft.com/en-us/library/cc185688(VS.85).aspx" target="_blank">Windows Installer</a> present on a system.  The <a href="http://msdn.microsoft.com/en-us/library/aa369294(VS.85).aspx" target="_blank">installation package</a> for new products may be designed to use a feature added to a specific version of Windows Installer.  It can be helpful to know whether you need to upgrade Windows Installer before attempting deployment of the new product.</p>
<p>According to the <a href="http://blogs.msdn.com/windows_installer_team/archive/2005/08/05/448386.aspx" target="_blank">Windows Installer Team</a>, the best way to determine the version of Windows Installer is to examine the version of the &#8220;MSI.dll&#8221; file.  The following PowerShell command lines do this.</p>
<p>NOTE: Sometimes I choose to issue individual PowerShell command lines rather than running a script.  I&#8217;ll explain this later, but even for very long command lines, they can be pasted into the command window without any problems.  It doesn&#8217;t matter if they wrap.  Also, you can paste several lines at once.</p>
<p>The command lines are:</p>
<p>    <code style="font-size:smaller;"></p>
<p style="text-align:left;">$OriginalErrorActionPreference = $ErrorActionPreference;</p>
<p style="text-align:left;">$ErrorActionPreference = 'SilentlyContinue';</p>
<p style="text-align:left;">Get-ChildItem -Path 'C:\Windows\Sys*[36][24]\' -Include ('MSI.dll', 'MSIExec.exe') -Recurse | Sort-Object -Property DirectoryName, Name | Select-Object -Property DirectoryName, Name, @{Name='FileSize';Expression={'{0:N0}' -f $_.Length}}, @{Name='LastWriteTime';Expression={$_.LastWriteTime.ToString('yyyy-MM-dd HH:mm:ss')}}, @{Name='Version';Expression={[System.Diagnostics.FileVersionInfo]::GetVersionInfo($_.FullName).FileVersion;}} | Format-List;</p>
<p style="text-align:left;">$ErrorActionPreference = $OriginalErrorActionPreference;</p>
<p>    </code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tnbarkhouse.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tnbarkhouse.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tnbarkhouse.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tnbarkhouse.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tnbarkhouse.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tnbarkhouse.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tnbarkhouse.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tnbarkhouse.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tnbarkhouse.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tnbarkhouse.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tnbarkhouse.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tnbarkhouse.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tnbarkhouse.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tnbarkhouse.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqlserversleuth.com&#038;blog=6775699&#038;post=61&#038;subd=tnbarkhouse&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqlserversleuth.com/2009/07/08/using-powershell-to-determine-the-windows-installer-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a662186ae400e1e95ffca05d7b474fd7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tnbarkhouse</media:title>
		</media:content>
	</item>
	</channel>
</rss>
