<?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>dougzuck.com</title>
	<atom:link href="http://dougzuck.com/feed" rel="self" type="application/rss+xml" />
	<link>http://dougzuck.com</link>
	<description>A place to put some stuff...</description>
	<lastBuildDate>Sun, 25 Jul 2010 19:48:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>My frustrating experience trying to purchase a new iPhone 4</title>
		<link>http://dougzuck.com/my-frustrating-experience-trying-to-purchase-a-new-iphone-4</link>
		<comments>http://dougzuck.com/my-frustrating-experience-trying-to-purchase-a-new-iphone-4#comments</comments>
		<pubDate>Sun, 25 Jul 2010 19:48:42 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Current Events]]></category>
		<category><![CDATA[Pop]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://dougzuck.com/?p=806</guid>
		<description><![CDATA[I need to vent&#8230;  First off, let me say that I&#8217;m an Apple hater.  I&#8217;m an Apple hater, but I&#8217;m also an iPhone lover.  I know it sounds stupid.  Honestly, I&#8217;ve tried to like Apple many times over the years, and this even includes purchasing a Mac Mini at one point a couple years ago, [...]]]></description>
			<content:encoded><![CDATA[<p>I need to vent&#8230;  First off, let me say that I&#8217;m an Apple hater.  I&#8217;m an Apple hater, but I&#8217;m also an iPhone lover.  I know it sounds stupid.  Honestly, I&#8217;ve tried to like Apple many times over the years, and this even includes purchasing a Mac Mini at one point a couple years ago, but I ended up selling it soon after because I was so frustrated with it.  What can I say&#8211;  I&#8217;m a PC guy at heart.  Moreover, walking into the Apple store makes my skin crawl.  I hate the vibe.  I hate the people who work there and their Apple-loving attitudes.  It just drives me crazy.  But here I am trying to buy a new iPhone because I think it&#8217;s the coolest piece of technology out right now, so this also seemed like a good time for me to give Apple another chance at not frustrating me or pissing me off.  Well, it didn&#8217;t work.</p>
<p>The company I work for has generously offered to reimburse me for the cost of a new iPhone 4.  I currently own the iPhone 3GS, which my company also paid for.  When the iPhone 4 first came out, I wanted to buy it from the Apple website because that seemed like the easiest and fastest way to get it.  However, while I was attempting to purchase it online, I learned that Apple requires you to ship it to the address where your AT&amp;T account is registered, and that it will require a signature at the time of delivery.  Seems reasonable enough, but unfortunately I live in an apartment, and I don&#8217;t have anyone to sign for my packages, so I can&#8217;t have it shipped to me unless I want to deal with picking it up at the carrier&#8217;s facility after a failed delivery attempt.  However, that&#8217;s a pain because like most of the rest of the people in this country, I have a job that makes it difficult for me to get to a carrier&#8217;s facility during their business hours.  It&#8217;s not that I absolutely can&#8217;t do it, it&#8217;s that I&#8217;d prefer not to if I don&#8217;t have to.  It would be really nice if I could just have the phone shipped to my office, but of course that&#8217;s not allowed as I mentioned a moment ago.</p>
<p>The truth is that I&#8217;m not in a huge rush to get the new phone.  Sure I&#8217;d like to get it sooner rather than later, but I&#8217;m certainly not losing any sleep over it.  At this time you still can&#8217;t just walk into an Apple store to buy the phone.  You have to get put on a waiting list, and then they email you when it&#8217;s your time to come to the store, at which point you have 24 hours to buy the phone before they remove you from the list.  Seems simple enough, so I got put on the list.  Today I received my notification that I can go to the store and buy the phone, but when I got to the store they told me that I have to work with one of their specialists to activate the new phone before I leave the store.  This sounds like a pretty normal situation, but the thing is I actually don&#8217;t want to activate the phone right away.  I&#8217;m hoping to get a case for the phone that I like before I actually start using the phone on a daily basis, but there aren&#8217;t that many cases out there for the new iPhone yet, and admittedly I&#8217;m pretty particular about cases, so I&#8217;d like to take my time and find one that works best for me.  Additionally, they don&#8217;t sell any iPhone 4 cases in my local Apple store, so it&#8217;s not like I can even buy a temporary one while I&#8217;m there buying the phone.</p>
<p>I don&#8217;t understand why Apple is willing and able to ship a phone to you and let you activate yourself through iTunes at your leisure, but if you go to the store they require that you activate it on the spot, thereby deactivating your old iPhone (Note that this just applies to upgrading your phone at the subsidized price.  It does not apply to new phone purchases where you pay the full cost of the phone).  I would have allowed them to activate my phone on the spot if I could have at least purchased a temporary case for it until I find a more permanent case, but they don&#8217;t sell iPhone 4 cases for completely unknown reasons (yes, the do sell iPhone 3GS cases).  So, I left the store, and I still do not own a new iPhone.</p>
<p>I friggin hate Apple.  I hate going in that store.  I hate those stupid blue shirts their employees wear.  But I love the iPhone.  And for this, apparently I&#8217;m willing to overlook my disgust and distaste for everything else about Apple.</p>
]]></content:encoded>
			<wfw:commentRss>http://dougzuck.com/my-frustrating-experience-trying-to-purchase-a-new-iphone-4/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Reality Check &#8211; The Gulf Oil Spill Is the Largest, Most Consequential, Man-Made Environmental Disaster Ever</title>
		<link>http://dougzuck.com/reality-check-the-gulf-oil-spill-is-the-largest-most-consequential-man-made-environmental-disaster-ever</link>
		<comments>http://dougzuck.com/reality-check-the-gulf-oil-spill-is-the-largest-most-consequential-man-made-environmental-disaster-ever#comments</comments>
		<pubDate>Tue, 11 May 2010 03:53:37 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Current Events]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Gulf Oil Spill]]></category>

		<guid isPermaLink="false">http://dougzuck.com/?p=800</guid>
		<description><![CDATA[Let's be honest.  The oil gushing into the water is way beyond what BP can effectively cope with.  The cap on leak was never going to stop it from gushing.  BP had to do something to at least make it look like they were trying, but this thing is gonna be gushing for months.  Let's also not fool ourselves into thinking that the estimates for how fast the oil is gushing have any validity whatsoever.  While it's possible that the estimates could actually be high, it's far more likely that they are extremely low.  Mark my words that the impact of this disaster will reach way beyond the scope of what anyone is imagining right now.    ]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s be honest.  The oil gushing into the water is way beyond what BP can effectively cope with.  The cap on the leak was never going to stop it from gushing.  BP had to do <em>something</em> to at least make it look like they were trying, but this thing is gonna be gushing for months.  Let&#8217;s also not fool ourselves into thinking that the estimates for how fast the oil is gushing have any validity whatsoever.  While it&#8217;s possible that the estimates could actually be high, it&#8217;s far more likely that they are extremely low.  Mark my words that the impact of this disaster will reach way beyond the scope of what anyone is imagining right now.  I find it extremely disheartening.</p>
<p>What do you think?  How do you feel?  I&#8217;d love to hear what others have to say on the topic.</p>
]]></content:encoded>
			<wfw:commentRss>http://dougzuck.com/reality-check-the-gulf-oil-spill-is-the-largest-most-consequential-man-made-environmental-disaster-ever/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Michael Buble is disgraceful for ripping off Sara Bareilles</title>
		<link>http://dougzuck.com/michael-buble-is-disgraceful-for-ripping-off-sara-bareilles</link>
		<comments>http://dougzuck.com/michael-buble-is-disgraceful-for-ripping-off-sara-bareilles#comments</comments>
		<pubDate>Sat, 13 Feb 2010 03:25:48 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Pop]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Bareilles]]></category>
		<category><![CDATA[Buble]]></category>
		<category><![CDATA[Piano]]></category>
		<category><![CDATA[Ripoff]]></category>

		<guid isPermaLink="false">http://dougzuck.com/?p=787</guid>
		<description><![CDATA[Up until now it hasn&#8217;t been like me to just hop on the computer to blog about pop culture of any sort, but this morning I heard a horrible song on the radio while I was lying in bed, and I felt compelled now to share with you my disgust. A couple of years ago [...]]]></description>
			<content:encoded><![CDATA[<p>Up until now it hasn&#8217;t been like me to just hop on the computer to blog about pop culture of any sort, but this morning I heard a horrible song on the radio while I was lying in bed, and I felt compelled now to share with you my disgust.</p>
<p>A couple of years ago Sara Bareilles appeared on the scene with a super-catchy tune called <em>Love Song</em>.  One of the things that made it so catchy, and probably the defining quality of the song, is the main piano riff, which has a fun and unique sort-of jazzy cadence.</p>
<p>Fast forward to this morning when I woke up in bed to one of the worst radio stations in the country, <em>Mix 107.3 FM</em>.  It&#8217;s one of the local stations here in Washington DC, and they&#8217;ve got this guy who calls himself Jack Diamond and hosts the <em>Jack Diamond In The Morning</em> show.  I have the dial on my clock radio set to this station because as much as I hate it, every other station is even worse when it comes to the morning programming.  So, under protest, I continue to leave my 23 year-old clock radio set to<em> Mix 107.3</em> hoping that one of two things happen.  Either A, I wake up to a song instead of to the Jack Diamond morning talk show, or B, I wake up to a substitute show and host instead of Jack Diamond and his extremely lame sidekick Jimmy something-or-other.   Anyway, I digress.</p>
<p>Back to what I was saying&#8230;  A new song I had never heard before came on the radio while I was lying in bed this morning.  It&#8217;s called <em>Haven&#8217;t Met You Yet</em>, by Michael Buble.   Immediately it reminded me of <em>Love Song</em>, by Sara Bareilles, because it pretty much IS<em> Love Song</em>, but with a different melody.  I actually didn&#8217;t recognize the melody at all, which might mean that it&#8217;s original, but given how much I recognized the piano riff, I wouldn&#8217;t be surprised to find out that the melody was ripped off from another song too.</p>
<p>Who Michael Buble is, I couldn&#8217;t tell you.  I know nothing about him other than that he sucks, and that he blatantly ripped off Sara Bareilles.  If he had a brain he&#8217;d at least pick a song that wasn&#8217;t hugely popular so recently.  He could have ripped off some old song and no one would have known.</p>
<p>One item that I find interesting here is that under most circumstances in pop music, the melody is really the most important hooking factor, and the rhythm is generally a secondary component.  However, Sara Bareilles&#8217; <em>Love Song</em> hooked everyone with both a memorable melody <em>and</em> with an extremely catchy, rhythmic, syncopated piano riff.</p>
<p>Usually when one artist accuses another of ripping off a song, it&#8217;s the melody that&#8217;s the center of the debate.  However, in this case, Michael Buble&#8217;s melody is definitely very different from that of Sara Bareilles&#8217; <em>Love Song</em>.  Instead of stealing the melody, Buble and his co-writers apparently just took the catchy piano riff and changed the chords.  The riff in <em>Haven&#8217;t Met You Yet</em> still sounds like <em>Love Song, </em>but <em>Haven&#8217;t Met You Yet</em> as a whole song just plain sucks.  It&#8217;s ultra-mediocre with an unappealing melody, and there just isn&#8217;t a single thing about it that makes someone want to listen to it aside from the catchy piano riff.  And since he &#8220;borrowed&#8221; the catchy piano riff in the first place, what does he really have here with this song?  Why would any radio station ever consider playing it?</p>
]]></content:encoded>
			<wfw:commentRss>http://dougzuck.com/michael-buble-is-disgraceful-for-ripping-off-sara-bareilles/feed</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Remote Reboot X &#8211; New release coming soon!</title>
		<link>http://dougzuck.com/remote-reboot-x-new-release-coming-soon</link>
		<comments>http://dougzuck.com/remote-reboot-x-new-release-coming-soon#comments</comments>
		<pubDate>Tue, 26 Jan 2010 00:23:00 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dougzuck.com/?p=785</guid>
		<description><![CDATA[I&#8217;ve gotten a lot of requests for functionality and features over the past several months.  I&#8217;ve been working to get everything implemented and tested, but unfortunately I also have a full-time job occupying my time, so I haven&#8217;t completed all of the updates yet.  Keep checking back because I plan to release the new version [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve gotten a lot of requests for functionality and features over the past several months.  I&#8217;ve been working to get everything implemented and tested, but unfortunately I also have a full-time job occupying my time, so I haven&#8217;t completed all of the updates yet.  Keep checking back because I plan to release the new version soon!</p>
<p>-Doug</p>
]]></content:encoded>
			<wfw:commentRss>http://dougzuck.com/remote-reboot-x-new-release-coming-soon/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Remote Reboot X &#8211; The Ultimate WSUS Companion Tool &#8211; Version 1.5 Available Now</title>
		<link>http://dougzuck.com/remote-reboot-x-the-ultimate-wsus-companion-tool-version-1-5-available-now</link>
		<comments>http://dougzuck.com/remote-reboot-x-the-ultimate-wsus-companion-tool-version-1-5-available-now#comments</comments>
		<pubDate>Fri, 02 Oct 2009 23:22:57 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C sharp]]></category>
		<category><![CDATA[Remote Reboot]]></category>
		<category><![CDATA[Windows updates]]></category>
		<category><![CDATA[WSUS]]></category>

		<guid isPermaLink="false">http://dougzuck.com/?p=707</guid>
		<description><![CDATA[Download it here:  http://dougzuck.com/remoterebootx Along with bug fixes and cosmetic changes, here are some of the features that have been added: Automatically reboot if required after installing WSUS updates Automatically force reboot if normal reboot fails Automatically stop pinging after reboot In addition to installing downloaded updates you can now specify to search for available [...]]]></description>
			<content:encoded><![CDATA[<p>Download it here:  <a href="http://dougzuck.com/remoterebootx" target="_self">http://dougzuck.com/remoterebootx</a></p>
<p>Along with bug fixes and cosmetic changes, here are some of the features that have been added:</p>
<ul>
<li>Automatically reboot if required after installing WSUS updates</li>
<li>Automatically force reboot if normal reboot fails</li>
<li>Automatically stop pinging after reboot</li>
<li>In addition to installing downloaded updates you can now specify to search for available updates, then download and install them all with a single click</li>
<li>Save and load state (XML import/export)</li>
<li>Wake On LAN</li>
</ul>
<p style="text-align: center;"><a href="http://dougzuck.com/wp-content/uploads/2009/05/rrx20091013.png"><img class="aligncenter size-full wp-image-743" title="rrx20091013" src="http://dougzuck.com/wp-content/uploads/2009/05/rrx20091013.png" alt="rrx20091013" width="540" height="315" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://dougzuck.com/remote-reboot-x-the-ultimate-wsus-companion-tool-version-1-5-available-now/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML Application &#8211; SQL Differential Backup Size Prediction</title>
		<link>http://dougzuck.com/html-application-sql-differential-backup-size-prediction</link>
		<comments>http://dougzuck.com/html-application-sql-differential-backup-size-prediction#comments</comments>
		<pubDate>Sun, 02 Aug 2009 20:50:01 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[HTML Applications]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[HTA]]></category>

		<guid isPermaLink="false">http://dougzuck.com/?p=645</guid>
		<description><![CDATA[You can find the full post here: http://dougzuck.com/hta]]></description>
			<content:encoded><![CDATA[<p>You can find the full post here: <a href="http://dougzuck.com/hta">http://dougzuck.com/hta</a></p>
<p style="text-align: center;"><a href="http://dougzuck.com/wp-content/uploads/2009/05/diffBackupPredictionHTA.png"><img class="aligncenter size-full wp-image-640" title="diffBackupPredictionHTA" src="http://dougzuck.com/wp-content/uploads/2009/05/diffBackupPredictionHTA.png" alt="diffBackupPredictionHTA" width="597" height="221" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://dougzuck.com/html-application-sql-differential-backup-size-prediction/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL &#8211; Differential Backup Size Prediction</title>
		<link>http://dougzuck.com/sql-differential-backup-size-prediction</link>
		<comments>http://dougzuck.com/sql-differential-backup-size-prediction#comments</comments>
		<pubDate>Sun, 02 Aug 2009 20:22:32 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://dougzuck.com/?p=625</guid>
		<description><![CDATA[SQL Differential Backup Size Prediction]]></description>
			<content:encoded><![CDATA[<p>One of the tasks I regularly have to perform at my job involves moving multi-terabyte databases from one server to another.  The goal is to make these database moves happen with as little downtime as possible, so I always make use of differential backups and restores to keep the move times to a minimum.  I&#8217;ll do a full backup of the source database, then I&#8217;ll perform a restore of that database to the new server, specifying &#8216;with norecovery&#8217; in the restore command.  For a 2 terabyte database, this process will take many hours, but that&#8217;s ok because I&#8217;ll make sure it&#8217;s complete prior to the actual maintenance window.  Then when the maintenance window begins, I&#8217;ll disable access to the database and perform a differential backup of the database on the source server.  Then I restore the differential backup &#8216;with recovery&#8217; to the new server.  The process of doing a differential backup and restore is <em>much</em> less time consuming than the full backup and restore, and this allows the actual maintenance window to be much smaller since the full backup and restore is completed at an earlier time.  However, when I&#8217;m dealing with such large databases, it becomes extremely helpful to know how big the differential backup is going to be before I actually execute it.  This way I&#8217;m able to estimate how long the whole process will take.  When you have a 2 terabyte database, it&#8217;s not uncommon to have a several hundred gigabyte differential backup.  You could see why it might help to know in advance whether the differential is going to be 10GB or 200GB.</p>
<p>Darwin Hatheway wrote a <a href="http://www.sqlservercentral.com/articles/Administration/differentialbackupprediction/2306/">really nice article</a> explaining how the differential backup size can be estimated.  He gets all the credit for teaching me how to do this.  I have two implementations below.  One is a straight T-SQL script, and the other is a HTML Application (HTA) that utilizes the T-SQL script with a bit of vbscript.  On a 2TB database it generally only takes a handful of seconds for the script to complete.</p>
<p>T-SQL Version: <a href="http://dougzuck.com/downloads/SQL-Differential-Backup-Size-Prediction-dz.sql">SQL Differential Backup Size Prediction</a><br />
HTML Application: <a href="http://dougzuck.com/hta">http://dougzuck.com/hta</a></p>
<p><a href="http://dougzuck.com/wp-content/uploads/2009/08/diffPredictionResults.png"><img class="aligncenter size-full wp-image-631" title="diffPredictionResults" src="http://dougzuck.com/wp-content/uploads/2009/08/diffPredictionResults.png" alt="diffPredictionResults" width="349" height="36" /></a></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/*SQL Differential Backup Size Prediction - Doug Zuckerman, 2009 - http://dougzuck.com */</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">IF</span> isNULL<span style="color: #66cc66;">&#40;</span>object_id<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'tempdb.dbo.##showFileStats'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;&gt;</span> <span style="color: #cc66cc;">1</span>
	<span style="color: #993333; font-weight: bold;">DROP</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #808080; font-style: italic;">##showFileStats</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #808080; font-style: italic;">##showFileStats (</span>
	fileID INT<span style="color: #66cc66;">,</span>
	fileGroup INT<span style="color: #66cc66;">,</span>
	totalExtents BIGINT<span style="color: #66cc66;">,</span>
	usedExtents BIGINT<span style="color: #66cc66;">,</span>
	logicalFileName VARCHAR <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">500</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>	
	filePath VARCHAR <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1000</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">IF</span> isNULL<span style="color: #66cc66;">&#40;</span>object_id<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'tempdb.dbo.##DCM'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;&gt;</span> <span style="color: #cc66cc;">1</span>
	<span style="color: #993333; font-weight: bold;">DROP</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #808080; font-style: italic;">##DCM</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #808080; font-style: italic;">##DCM (</span>
	parentObject VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5000</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
	<span style="color: #66cc66;">&#91;</span>object<span style="color: #66cc66;">&#93;</span> VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5000</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
	<span style="color: #993333; font-weight: bold;">FIELD</span> VARCHAR <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5000</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
	value VARCHAR <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5000</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/*we need to get a list of all the files in the database.  each file needs to be looked at*/</span>	
<span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> <span style="color: #808080; font-style: italic;">##showFileStats EXEC('DBCC SHOWFILESTATS with tableresults')</span>
&nbsp;
DECLARE @currentFileID INT<span style="color: #66cc66;">,</span>
	@totalExtentsOfFile BIGINT<span style="color: #66cc66;">,</span>
	@dbname VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
	@SQL VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">200</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
	@currentDCM BIGINT<span style="color: #66cc66;">,</span>
	@step INT
&nbsp;
<span style="color: #993333; font-weight: bold;">SET</span> @dbname <span style="color: #66cc66;">=</span> db_name<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">SET</span> @step <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">511232</span>
&nbsp;
DECLARE myCursor SCROLL CURSOR <span style="color: #993333; font-weight: bold;">FOR</span>
<span style="color: #993333; font-weight: bold;">SELECT</span> fileID<span style="color: #66cc66;">,</span> totalExtents 
<span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #808080; font-style: italic;">##showFileStats</span>
&nbsp;
OPEN myCursor
FETCH NEXT <span style="color: #993333; font-weight: bold;">FROM</span> myCursor <span style="color: #993333; font-weight: bold;">INTO</span> @currentFileID<span style="color: #66cc66;">,</span> @totalExtentsOfFile
&nbsp;
<span style="color: #808080; font-style: italic;">/*look at each differential change map page in each data file of the database and put the output into ##DCM*/</span>
WHILE @@FETCH_STATUS <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> 
BEGIN
&nbsp;
	<span style="color: #993333; font-weight: bold;">SET</span> @currentDCM <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">6</span>
	WHILE @currentDCM <span style="color: #66cc66;">&lt;=</span> @totalExtentsOfFile<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">8</span>
	BEGIN	
		<span style="color: #993333; font-weight: bold;">SET</span> @SQL <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'dbcc page('</span><span style="color: #66cc66;">+</span> @dbname <span style="color: #66cc66;">+</span> <span style="color: #ff0000;">', '</span> <span style="color: #66cc66;">+</span> CAST<span style="color: #66cc66;">&#40;</span>@currentFileID <span style="color: #993333; font-weight: bold;">AS</span> VARCHAR<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">+</span> <span style="color: #ff0000;">', '</span> <span style="color: #66cc66;">+</span> CAST<span style="color: #66cc66;">&#40;</span>@currentDCM <span style="color: #993333; font-weight: bold;">AS</span> VARCHAR<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">+</span> <span style="color: #ff0000;">', 3) WITH TABLERESULTS'</span>
		<span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> <span style="color: #808080; font-style: italic;">##DCM EXEC (@SQL)</span>
		<span style="color: #993333; font-weight: bold;">SET</span> @currentDCM <span style="color: #66cc66;">=</span> @currentDCM <span style="color: #66cc66;">+</span> @step
	END
&nbsp;
	FETCH NEXT <span style="color: #993333; font-weight: bold;">FROM</span> myCursor <span style="color: #993333; font-weight: bold;">INTO</span> @currentFileID<span style="color: #66cc66;">,</span> @totalExtentsOfFile
END
CLOSE myCursor
DEALLOCATE myCursor
&nbsp;
<span style="color: #808080; font-style: italic;">/*remove all unneeded rows from our results table*/</span>
<span style="color: #993333; font-weight: bold;">DELETE</span> <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #808080; font-style: italic;">##DCM WHERE value = 'NOT CHANGED' OR parentObject NOT LIKE 'DIFF_MAP%'</span>
<span style="color: #808080; font-style: italic;">--SELECT * FROM ##DCM</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/*sum the extentTally column*/</span>
<span style="color: #993333; font-weight: bold;">SELECT</span> SUM <span style="color: #66cc66;">&#40;</span>extentTally<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> totalChangedExtents<span style="color: #66cc66;">,</span> SUM<span style="color: #66cc66;">&#40;</span>extentTally<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">16</span> <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #ff0000;">'diffPrediction(MB)'</span><span style="color: #66cc66;">,</span> SUM<span style="color: #66cc66;">&#40;</span>extentTally<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">16</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">1024</span> <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #ff0000;">'diffPrediction(GB)'</span> 
<span style="color: #993333; font-weight: bold;">FROM</span>
	<span style="color: #808080; font-style: italic;">/*create extentTally column*/</span>
	<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> extentTally <span style="color: #66cc66;">=</span>
	CASE
		WHEN secondChangedExtent <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> THEN CAST<span style="color: #66cc66;">&#40;</span>secondChangedExtent <span style="color: #993333; font-weight: bold;">AS</span> BIGINT<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">-</span> CAST<span style="color: #66cc66;">&#40;</span>firstChangedExtent <span style="color: #993333; font-weight: bold;">AS</span> BIGINT<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">+</span> <span style="color: #cc66cc;">1</span>
		ELSE <span style="color: #cc66cc;">1</span>
	END
	<span style="color: #993333; font-weight: bold;">FROM</span>
		<span style="color: #808080; font-style: italic;">/*parse the 'field' column to give us the first and last extents of the range*/</span>
		<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">&#40;</span>SUBSTRING<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">FIELD</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> CHARINDEX<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">':'</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">FIELD</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">+</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span>CHARINDEX<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">')'</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">FIELD</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">-</span><span style="color: #66cc66;">&#40;</span>CHARINDEX<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">':'</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">FIELD</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">-</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">8</span> <span style="color: #993333; font-weight: bold;">AS</span> firstChangedExtent<span style="color: #66cc66;">,</span>
		secondChangedExtent <span style="color: #66cc66;">=</span> 
		CASE	
			WHEN CHARINDEX<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">':'</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">FIELD</span><span style="color: #66cc66;">,</span> CHARINDEX<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">':'</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">FIELD</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">+</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span> THEN <span style="color: #66cc66;">&#40;</span>SUBSTRING<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">FIELD</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span>CHARINDEX<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">':'</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">FIELD</span><span style="color: #66cc66;">,</span> CHARINDEX<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">':'</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">FIELD</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">+</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">+</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #66cc66;">&#40;</span>CHARINDEX<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">')'</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">FIELD</span><span style="color: #66cc66;">,</span>CHARINDEX<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">')'</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">FIELD</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">+</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">-</span><span style="color: #66cc66;">&#40;</span>CHARINDEX<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">':'</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">FIELD</span><span style="color: #66cc66;">,</span> CHARINDEX<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">':'</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">FIELD</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">+</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">-</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">8</span>
			ELSE <span style="color: #ff0000;">''</span>
		END 
		<span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #808080; font-style: italic;">##DCM)parsedFieldColumn)extentTallyColumn</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://dougzuck.com/sql-differential-backup-size-prediction/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I HATE Cable Companies!</title>
		<link>http://dougzuck.com/why-i-hate-cable-companies</link>
		<comments>http://dougzuck.com/why-i-hate-cable-companies#comments</comments>
		<pubDate>Thu, 23 Jul 2009 03:07:32 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dougzuck.com/?p=617</guid>
		<description><![CDATA[Example 1: For years now I&#8217;ve been paying for a 7mbps internet connection through my local cable company, RCN.  At some point several months ago I noticed that my bill listed me with a 10mbps connection.  The RCN website no longer even listed a 7mbps plan.  However, even though my bill said 10mbps, I&#8217;ve regularly [...]]]></description>
			<content:encoded><![CDATA[<h2>Example 1:</h2>
<p>For years now I&#8217;ve been paying for a 7mbps internet connection through my local cable company, RCN.  At some point several months ago I noticed that my bill listed me with a 10mbps connection.  The RCN website no longer even listed a 7mbps plan.  However, even though my bill said 10mbps, I&#8217;ve regularly tested the connection speed over the past months, and it always maxes out at 7mbps.  I tested it one last time before heading off to work this morning, and it was still at 7.</p>
<p>Finally this afternoon I got around to making the dreaded phone call that I had been putting off for months.  I wasn&#8217;t at all surprised when the technician on the other end of the line said &#8220;I&#8217;m showing that your account is already active for 10mbps.&#8221;  Of course he wanted me to be sitting at my computer to walk through some tests with him, which is something that I couldn&#8217;t do since I was at work when I called.</p>
<p>When I got home this evening, the first thing I did after turning on my computer was a quick bandwidth test.  Lo and behold, I&#8217;m now magically getting a full 10mbps.</p>
<p>If the cable company is going to try and skimp its customers because they know that most customers wouldn&#8217;t ever realize that they&#8217;re not getting their full bandwidth allocation, the least they could do is not pretend we&#8217;ve already been upgraded to 10mbps, when clearly we haven&#8217;t been.</p>
<h2>Example 2:</h2>
<p>After I got off the phone with the tech support guy I called up the billing department.  As everyone knows, cable bills are totally fluid.  It seems like each month the amount I owe increases by a little bit.  It&#8217;s just small enough that I notice it but don&#8217;t want to bother calling up to complain because it&#8217;s such a nightmare dealing with customer service.  When I got on the phone with the representative this afternoon I said &#8220;My bill continues to rise each month.  Is there anything I can do to lower it?&#8221;  After putting me on hold for a minute or two he comes back on the line and says &#8220;I&#8217;ve just applied a promotion to your account, and you&#8217;ll get $10 off every bill for the next 12 months.&#8221;  I told him thank you and then hung up.</p>
<p>Now, on the one hand it&#8217;s nice that you can call up and ask them to lower your bill and they&#8217;ll kindly oblige.  On the other hand, it kills me that they rip us all off until we actually say something to them about it!</p>
<h2>Example 3:</h2>
<p>A few months ago my cable modem was malfunctioning.  I had already done all the troubleshooting and was quite sure that the problem was with the modem.  After 5 days in a row, 5 different tech support reps, and approximately 5 hours on the phone, I was still getting &#8220;Sir, we don&#8217;t see a problem with the modem or the connection, and there is no supervisor available to speak with you.&#8221;</p>
<p>On the 6th day I called again.  Their system is setup in such a way that if you go more than 5 days without a resolution, they will finally let you talk to someone who actually has a clue.  Within approximately 5 minutes, this second-tier technician was able to diagnose a problem with my modem, just as I had suggested all along.  He gave me the address of a local office where I could exchange it for a new one, and I was once again up and running.</p>
<h3>I HATE CABLE COMPANIES!</h3>
]]></content:encoded>
			<wfw:commentRss>http://dougzuck.com/why-i-hate-cable-companies/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HTML Application &#8211; Retrieve SP_WHO2 and the Input Buffer from a SQL Server</title>
		<link>http://dougzuck.com/html-application-retrieve-sp_who2-and-the-input-buffer-from-a-sql-server</link>
		<comments>http://dougzuck.com/html-application-retrieve-sp_who2-and-the-input-buffer-from-a-sql-server#comments</comments>
		<pubDate>Sun, 05 Jul 2009 01:56:56 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[HTML Applications]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[HTA]]></category>

		<guid isPermaLink="false">http://dougzuck.com/?p=600</guid>
		<description><![CDATA[You can find the full post here: http://www.dougzuck.com/hta]]></description>
			<content:encoded><![CDATA[<p>You can find the full post here: <a href="http://www.dougzuck.com/hta" target="_self">http://www.dougzuck.com/hta</a></p>
<p style="text-align: center;"><a href="http://dougzuck.com/wp-content/uploads/2009/05/get_sql_spwho2_and_inputbuffer.png"><img class="aligncenter size-large wp-image-520" title="get_sql_spwho2_and_inputbuffer" src="http://dougzuck.com/wp-content/uploads/2009/05/get_sql_spwho2_and_inputbuffer-1024x676.png" alt="get_sql_spwho2_and_inputbuffer" width="614" height="406" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://dougzuck.com/html-application-retrieve-sp_who2-and-the-input-buffer-from-a-sql-server/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decrease Malware Infections Using Software Restriction Policies (SRP) to Strip Administrative Privileges from Internet-Facing Applications</title>
		<link>http://dougzuck.com/decrease-malware-infections-using-software-restriction-policies</link>
		<comments>http://dougzuck.com/decrease-malware-infections-using-software-restriction-policies#comments</comments>
		<pubDate>Fri, 03 Jul 2009 04:27:51 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Security Restriction Policies]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://dougzuck.com/?p=541</guid>
		<description><![CDATA[I know that many organizations do not put restrictions on their users&#8217; computers.  The users are often given full administrative privileges on their workstations, which means that they can not only mess around with all the settings on their computers, but they can also install and uninstall applications.  This includes accidental virus and malware installations.  [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">I know that many organizations do not put restrictions on their users&#8217; computers.  The users are often given full administrative privileges on their workstations, which means that they can not only mess around with all the settings on their computers, but they can also install and uninstall applications.  This includes accidental virus and malware installations.  While many <a href="http://en.wikipedia.org/wiki/System_administrator" target="_blank">Systems and Network Admins</a> consider this unacceptable, it&#8217;s still a reality in many working environments.  So rather than complain about how it&#8217;s not the ideal way to run a windows network, let&#8217;s focus on cool ways to mitigate the risks of this approach.  This is one VERY simple but effective method to limit malware infections on your network computers while still allowing users to be local administrators.  This approach can be used across an entire network with a group policy object, or it can simply be applied to a single computer by modifying the computer&#8217;s local security policy.</p>
<h3 style="text-align: left;">Overview&#8230;</h3>
<p style="text-align: left;">The idea here is that you apply a group policy object to the users or computers in your organization.   It prevents whatever applications you choose from launching with full admin privileges on the users&#8217; computers.  The users are still local administrators, but the particular applications that you pre-select get launched <em>without </em>administrative permissions.  If you apply this restriction to all of the applications that deal with typically untrusted, unsafe, or unknown content, then you dramatically decrease the likelihood that a virus or other malware can be installed because non-admin users are not able to install software on the computer.  Windows doesn&#8217;t let them.  I recommend applying it to all web browsers, all email clients, and all media players because these are the primary apps that deal with internet content.  You could alternatively apply it to the entire C:\Program Files folder, but if you do so you should be mindful of the fact that some apps might break as a result.</p>
<p style="text-align: left;">You can produce functionality that is similar to <a href="http://blogs.msdn.com/michael_howard/archive/2007/08/13/update-on-dropmyrights.aspx" target="_blank">DropMyRights</a> but <em>without </em>the annoyances that come along with it.  In my opinion this method is by far the easiest to deploy to a lot of users or computers, something which <a href="http://blogs.msdn.com/michael_howard/archive/2007/08/13/update-on-dropmyrights.aspx" target="_blank">DropMyRights </a>isn&#8217;t suited for (since any time an application is updated or a new one installed, the <a href="http://blogs.msdn.com/michael_howard/archive/2007/08/13/update-on-dropmyrights.aspx" target="_blank">DropMyRights </a>configuration has to be re-applied).  Using <a href="http://technet.microsoft.com/en-us/library/bb457006.aspx" target="_blank">Software Restriction Policies</a>, you can apply this functionality in a way that is virtually transparent to users.  However, Microsoft doesn&#8217;t publicize this particular usage of SRP for whatever reason (the functionality is actually hidden in XP by default &#8211; you need to add a registry DWORD to make it available), which is why I&#8217;m taking the time to mention it here.  When I embarked on setting this up today at my job I spent hours researching something that took only minutes to implement.  Hopefully I&#8217;m now saving you the hours of research.</p>
<h3 style="text-align: left;">Caveat&#8230;</h3>
<p style="text-align: left;">The only real caveat is that when an application is launched without admin privileges, if that application then launches another process or program, the program that it launches will also not have admin privileges.  This means that if a user wants to install software that he/she downloads from the web, he/she needs to be aware that launching the setup.exe file directly from browser&#8217;s &#8216;Downloads&#8217; window will generate an error and abort the installation.  In some cases it might not throw an error and instead will appear to install successfully, but when the app is launched it isn&#8217;t able to run because the installation was actually not successful.  Users have to be trained to save the application setup files to their desktops (or wherever) and then launch them from the desktops or through Windows Explorer.</p>
<p style="text-align: left;">Additionally, it is up to you test out any applications that you restrict.  While most of the time this is a transparent deployment, there is always the possibility that this restriction could hinder a custom application from working in the way that it was designed.  However, for most applications in most situations it works great and causes no issues.</p>
<h3 style="text-align: left;">Here&#8217;s the step by step:</h3>
<p style="text-align: left;">1. Expose the hidden &#8216;Basic User&#8217; option by opening the registry editor and adding a DWORD called &#8220;Levels&#8221; with a value of 20000 (hexadecimal) to</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">HKLM\Software\Policies\Microsoft\Windows\Safer\CodeIdentifiers</pre></div></div>

<p style="text-align: center;"><a href="http://dougzuck.com/wp-content/uploads/2009/07/SRP4.png"><img class="size-medium wp-image-546 aligncenter" title="SRP4" src="http://dougzuck.com/wp-content/uploads/2009/07/SRP4-300x152.png" alt="SRP4" width="300" height="152" /></a></p>
<p style="text-align: center;">
<p style="text-align: left;">2. Open the domain Group Policy editor (or to apply to a single computer, open the local policy editor by going to Start &gt; Run &gt; gpedit.msc) and go to</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">Computer Configuration\Windows Settings\Security Settings\Software Restriction Policies</pre></div></div>

<p style="text-align: left;">If this is the first time you&#8217;ve looked at the Software Restriction Policies, the right hand pane will be empty.  To rectify this, click on Action  &gt; Create New Policies.  Once you&#8217;ve done this you should see &#8216;Security Levels&#8217; and &#8216;Additional Rules.&#8217;  Now click on &#8216;Security Levels&#8217; and verify that you see 3 options (Disallowed, Basic User, and Unrestricted).</p>
<p style="text-align: left;">If you do <em>not </em>see the &#8216;Basic User&#8217; option on the right-hand pane, close the GPO editor, go back to step 1 and make sure you&#8217;ve properly created the registry DWORD, then re-open the GPO editor (Note that the Basic User option is hidden in Windows XP until you add the Levels DWORD value).</p>
<p style="text-align: center;"><a href="http://dougzuck.com/wp-content/uploads/2009/07/SRP1.png"><img class="size-medium wp-image-545 aligncenter" title="SRP1" src="http://dougzuck.com/wp-content/uploads/2009/07/SRP1-300x267.png" alt="SRP1" width="300" height="267" /></a></p>
<p style="text-align: left;">3.  At this point you&#8217;re going to highlight &#8216;Additional Rules&#8217; and right click to create a new path rule. Specify the path to the application that you want to limit.  In the path entry you can use the asterisk (*) as a wild card for multiple letters/words.  The question mark symbol can be used as a wild card for a single letter.</p>
<p style="text-align: left;">Set the security level drop-down menu to Basic User.  This is the key ingredient that makes the magic happen.  Now any executable file in the specified path or its subfolders will launch with limited user privileges on a computer that receives this GPO.</p>
<p style="text-align: center;"><a href="http://dougzuck.com/wp-content/uploads/2009/07/SRP2.png"><img class="size-medium wp-image-547 aligncenter" title="SRP2" src="http://dougzuck.com/wp-content/uploads/2009/07/SRP2-300x272.png" alt="SRP2" width="300" height="272" /></a></p>
<p style="text-align: center;"><a href="http://dougzuck.com/wp-content/uploads/2009/07/SRP3.png"><img class="size-medium wp-image-548 aligncenter" title="SRP3" src="http://dougzuck.com/wp-content/uploads/2009/07/SRP3-300x268.png" alt="SRP3" width="300" height="268" /></a></p>
<p style="text-align: left;">4.  When you&#8217;re done creating the policy, link it to your workstations OU and test it!  That&#8217;s it.  Pretty simple, eh?</p>
<p style="text-align: left;">In this example, I&#8217;ve limited Firefox so that it can only be launched as a Basic User with no admin rights.  I&#8217;m able to verify this is the case by first closing all instances of Firefox, then launching it once again after the path rule has been created.  I browse to a website and download a software installation package.  I then try to launch the software package from within Firefox&#8217;s &#8216;Downloads&#8217; window, but I can&#8217;t perform the installation, so I know it works!</p>
<p style="text-align: left;"><a href="http://dougzuck.com/wp-content/uploads/2009/07/srp5.png"><img class="aligncenter size-medium wp-image-584" title="srp5" src="http://dougzuck.com/wp-content/uploads/2009/07/srp5-300x201.png" alt="srp5" width="300" height="201" /></a><a href="http://dougzuck.com/wp-content/uploads/2009/07/srp6.png"><img class="aligncenter size-medium wp-image-585" title="srp6" src="http://dougzuck.com/wp-content/uploads/2009/07/srp6-300x194.png" alt="srp6" width="300" height="194" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://dougzuck.com/decrease-malware-infections-using-software-restriction-policies/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
