<?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>Nacimota.com &#187; Tutorials</title>
	<atom:link href="http://www.nacimota.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nacimota.com</link>
	<description>Technology, Gaming and Development</description>
	<lastBuildDate>Wed, 30 Jun 2010 22:55:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Windows 7 in .Net &#8211; Jump Lists</title>
		<link>http://www.nacimota.com/2010/06/29/windows-7-in-dotnet-jump-lists/</link>
		<comments>http://www.nacimota.com/2010/06/29/windows-7-in-dotnet-jump-lists/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 14:00:34 +0000</pubDate>
		<dc:creator>Nacimota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Forms]]></category>

		<guid isPermaLink="false">http://www.nacimota.com/?p=125</guid>
		<description><![CDATA[Editor&#8217;s Note: This article was originally written in February 2010, and at the time the released version of .Net (version 3.5) did not implement features new to Windows 7. These features are now accessible in .Net 4.0 which has since &#8230; <a href="http://www.nacimota.com/2010/06/29/windows-7-in-dotnet-jump-lists/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: left; padding-left: 30px;">Editor&#8217;s Note:<br />
This article was originally written in February 2010, and at the time the released version of .Net (version 3.5) did not implement features new to Windows 7. These features are now accessible in .Net 4.0 which has since been released with Visual Studio 2010 but require the use of WPF, which means if you&#8217;re planning on staying with Windows Forms this is probably the only method still open to you. I hope to cover accessing Windows 7 features via WPF in the future.</p>
<p>Since its release, Windows 7 has had a very strong uptake with consumers across the globe (that is, in comparison with other operating systems in the past). This should come as no surprise to anyone, as <a title="It's even better than Windows ME!!" href="http://en.wikipedia.org/wiki/Windows_7#Reception" target="_blank">Windows 7 is pretty awesome</a>.</p>
<p>Windows 7 introduces <a title="It's feature-tastic!" href="http://en.wikipedia.org/wiki/Features_new_to_Windows_7" target="_blank">tons of new features</a> which are pretty cool individually, but together add up to a huge improvement over its predecessors. One of the coolest of these features &#8211; or at least the one that had the most media attention &#8211; is the new task bar.</p>
<p>There are a lot of new components introduced with the new taskbar, but for the purposes of this article, I&#8217;m only going to focus on Jump Lists; further on I plan to talk about progress bars in taskbar buttons, and image overlays on taskbar buttons, but those will be in future posts. These features are particularly handy for 3rd party developers and I&#8217;ve noticed a lot of people looking for ways to access them in the .Net environment.<span id="more-125"></span></p>
<p>There are two primary approaches to this problem; since both have their merits, I&#8217;ll focus on one, then the other.</p>
<p>Since the current version of .Net (at the time I wrote this, version 3.5) has been around well before the release of Windows 7, it&#8217;s certainly no surprise that these features are not directly supported by the .Net Framework. However, luckily for us, Microsoft has provided a library for accessing these features in .Net, which is basically a wrapper for part of the new Windows API. You can download the latest version here:</p>
<p><a title="Windows API Code Pack" href="http://code.msdn.microsoft.com/WindowsAPICodePack" target="_blank">http://code.msdn.microsoft.com/WindowsAPICodePack</a></p>
<p>Just in case that link breaks in the future, I&#8217;ve also uploaded version 1.0.1 of the code pack here:</p>
<p><a title="Windows API Code Pack 1.0.1" href="http://files.nacimota.com/WindowsAPICodePack101.zip" target="_self">http://files.nacimota.com/WindowsAPICodePack101.zip</a></p>
<p>The code pack is actually distributed as source code instead of binaries. While we could include the source in our solution, I find it much simpler and cleaner to build the DLLs then use them as references in our project, so let&#8217;s do that.</p>
<p>After extracting everything in the ZIP archive to a folder of your choice, enter the <em>WindowsAPICodePack</em> folder and open <em>WindowsAPICodePack.sln </em>in either Visual C# Express 2008 or Visual Studio 2008 (you can open it in future versions but you will be required to upgrade the solution first).</p>
<p>Once the solution is open, click <em>Build &gt; Build Solution</em>. Binaries for each project in the solution should have been compiled and can now be found in the <em>\bin\Debug</em> subdirectory of each project directory in the code pack.</p>
<p>You can now close the solution and open/create your own project. I&#8217;m going to create a .Net 3.5 Windows Forms application in Visual C# Express; I&#8217;ve called it <em>Taskbar Fun</em>.</p>
<div class="mceTemp mceIEcenter" style="text-align: justify;">
<dl id="attachment_132" class="wp-caption aligncenter" style="width: 310px;">
<dt class="wp-caption-dt"><a href="http://files.nacimota.com/2010/02/taskbarproject.jpg"><img class="size-medium wp-image-132" title="Creatin' a Windows Forms app" src="http://files.nacimota.com/2010/02/taskbarproject-300x179.jpg" alt="Creatin' a Windows Forms app" width="300" height="179" /></a></dt>
<dd class="wp-caption-dd">You can actually create a WPF or console app, but WinForms seems more appropriate</dd>
</dl>
</div>
<p>In the <em>Solution Explorer</em>, right click on <em>References</em> and select <em>Add Reference&#8230;</em></p>
<p>Since Visual Studio isn&#8217;t yet aware of the libraries we want to reference, we need to select the browse tab and locate them manually. Browse to the directory where you extracted the code pack and select the following binaries from <em>WindowsAPICodePack\Shell\bin\Debug</em>:</p>
<p>Microsoft.WindowsAPICodePack.dll<br />
Microsoft.WindowsAPICodePack.Shell.dll</p>
<p>Then click OK to add references to those binaries.</p>
<p>Next, head over to the code for our default form (by default, it should be called <em>Form1.cs</em>), since this is where we will add our Windows 7 magic. Add the following directives to the top of the file so we can access the namespaces in the libraries without typing them over and over:</p>
<pre class="brush: csharp;">using Microsoft.WindowsAPICodePack;
using Microsoft.WindowsAPICodePack.Shell;
using Microsoft.WindowsAPICodePack.Taskbar;</pre>
<p>You can also rename the file and class to something more appropriate if it pleases you. I&#8217;m just going to call mine <em>MainForm</em>.</p>
<p>Create a <em>JumpList</em> object at the start of the class. We&#8217;ll initialize our <em>JumpList</em> in the form&#8217;s Shown event, so create that event and the necessary handler now.</p>
<pre class="brush: csharp; first-line: 5;">namespace TaskbarFun
{
    public partial class MainForm : Form
    {
        private JumpList jumplist;
        public MainForm()
        {
            InitializeComponent();
            this.Shown += new EventHandler(MainForm_Shown);
        }

        void MainForm_Shown(object sender, EventArgs e)
        {
            // stuff goes here
        }
    }
}</pre>
<p>Inside our event handler, set the value of the <em>JumpList</em> object to <em>JumpList.CreateJumpList()</em>. This does some basic initialization stuff with our <em>JumpList </em>like associating it with our application. Before we can actually see our jump list, we&#8217;re obviously going to have to add some items. Let&#8217;s start with a <em>JumpListLink</em>, which is essentially just a windows shortcut. For my <em>JumpListLink</em>, I&#8217;m going to create a shortcut to Notepad. The constructor of the <em>JumpListLink</em> class demands a path and a title. Notepad is located in system32 directory; the title is completely arbitrary.</p>
<pre class="brush: csharp; first-line: 16;">void MainForm_Shown(object sender, EventArgs e)
{
    jumplist = JumpList.CreateJumpList();
    JumpListLink notepadlink = new JumpListLink(&quot;C:\\Windows\\system32\\notepad.exe&quot;, &quot;Open Notepad&quot;);
}</pre>
<p>Next, we need to add our <em>JumpListLink</em> object to our <em>JumpList</em>, then update taskbar so that our changes are visible. Items are added to a <em>JumpList</em> using the <em>JumpList.AddUserTasks()</em> method. To update the actual jump list in the tasbar using our <em>JumpList</em> object, call the <em>JumpList .Refresh()</em> method.</p>
<pre class="brush: csharp; first-line: 16;">void MainForm_Shown(object sender, EventArgs e)
{
    jumplist = JumpList.CreateJumpList();
    JumpListLink notepadlink = new JumpListLink(&quot;C:\\Windows\\system32\\notepad.exe&quot;, &quot;Open Notepad&quot;);
    jumplist.AddUserTasks(notepadlink);
    jumplist.Refresh();
}</pre>
<p>If you build your solution now you will see that the jump list works and we have our Open Notepad link. You&#8217;ll see the process is listed as vshost.exe instead of whatever your project name is; this is normal, of course.</p>
<p><img class="aligncenter size-full wp-image-155" title="A working jumplist" src="http://files.nacimota.com/2010/02/jumplist1.jpg" alt="A working jumplist" width="272" height="233" /><br />
You can also add separators by creating JumpListSeparator objects and adding them with the same method:</p>
<pre class="brush: csharp; first-line: 16;">void MainForm_Shown(object sender, EventArgs e)
{
    jumplist = JumpList.CreateJumpList();
    JumpListLink notepadlink = new JumpListLink(&quot;C:\\Windows\\system32\\notepad.exe&quot;, &quot;Open Notepad&quot;);
    JumpListSeparator separator = new JumpListSeparator();
    JumpListLink paintlink = new JumpListLink(&quot;C:\\Windows\\system32\\mspaint.exe&quot;, &quot;Open Paint&quot;);
    jumplist.AddUserTasks(notepadlink, separator, paintlink);
    jumplist.Refresh();
}</pre>
<p><a href="http://files.nacimota.com/2010/02/jumplist2.jpg"><img class="aligncenter size-full wp-image-159" title="Another jump list" src="http://files.nacimota.com/2010/02/jumplist2.jpg" alt="Another jump list" width="259" height="270" /></a></p>
<p>I&#8217;ll be focusing on other features like progress bars and icon overlays in future posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nacimota.com/2010/06/29/windows-7-in-dotnet-jump-lists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Carve Tool and You</title>
		<link>http://www.nacimota.com/2009/12/07/the-carve-tool-and-you/</link>
		<comments>http://www.nacimota.com/2009/12/07/the-carve-tool-and-you/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 15:30:10 +0000</pubDate>
		<dc:creator>Nacimota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Hammer]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[Source]]></category>

		<guid isPermaLink="false">http://www.nacimota.com/?p=95</guid>
		<description><![CDATA[There’s something I’ve always wanted to discuss in regards to mapping with Valve Hammer Editor, and that is the use of the carve tool. As far as I’m aware, the carve tool was never intended to be used with anything other than a rectangular brush, because when given a more complicated primitive to work with (such as a cylinder) the results become quite messy.

This has resulted in many veteran mappers adopting a viewpoint that is essentially “NEVER USE THE CARVE TOOL”, which is then passed on to new and aspiring source mappers who read those kinds of comments in tutorials and forum posts. Despite this, the carve tool remains a useful technique for quickly creating rectangular holes in a brush and shouldn’t be discarded from your mapping arsenal. <a href="http://www.nacimota.com/2009/12/07/the-carve-tool-and-you/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There’s something I’ve always wanted to discuss in regards to mapping with Valve Hammer Editor, and that is the use of the carve tool. As far as I’m aware, the carve tool was never intended to be used with anything other than a rectangular brush, because when given a more complicated primitive to work with (such as a cylinder) the results become quite messy.</p>
<p>This has resulted in many veteran mappers adopting a viewpoint that is essentially “NEVER USE THE CARVE TOOL”, which is then passed on to new and aspiring source mappers who read those kinds of comments in tutorials and forum posts. Despite this, the carve tool remains a useful technique for quickly creating rectangular holes in a brush and shouldn’t be discarded from your mapping arsenal.<span id="more-95"></span></p>
<p>A question I’ve heard from new mappers over the years is, “if the carve tool shouldn’t be used for anything other than rectangular brushes, how do you properly create circular holes in a brush?”</p>
<p>The reason why the carve tool doesn’t work well with cylindrical brushes and so forth is primarily due to the simplicity of the algorithm behind it. When carving, Hammer executes multiple clips on the target brush parallel to each edge of the carve brush.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://files.nacimota.com/2009/10/carve-alg.swf" /><embed type="application/x-shockwave-flash" width="500" height="300" src="http://files.nacimota.com/2009/10/carve-alg.swf"> </embed></object></p>
<p>As you can see, this produces some nasty results, which can cause problems for the compiler as well as just being plain messy. What we’re going to do is follow a more complicated algorithm which, in my opinion, the carve tool should have used in the first place.</p>
<p>Since we’re going to be doing clips ourselves, we are of course, going to use the clipping tool. If you’ve never used the clipping tool before, now is your chance to learn.</p>
<p><img class="size-full wp-image-99 alignleft" title="The Clipping Tool" src="http://files.nacimota.com/2009/10/clipping.png" alt="The Clipping Tool" width="207" height="99" />The clipping tool is located in the toolbox between the overlay tool and the vertex tool.<span id="_marker"> The way it works is simple. With the clipping tool activated, you can drag a line across a selected brush (or multiple brushes) in any of the three 2D viewports. It is along this line the selected brush will be divided. The clipping tool has three modes; the first two keep one of the divisions while removing the other and the third mode keeps both divisions. You can tell which division will be removed by looking at the outlines of the brush in the current viewport.The part outlined in red will be removed while the part outlined in white will stay. If you only see white outlines then you are using mode three, which keeps both divisions.  To cycle through clipping modes, you can click the clipping tool icon again or hit Shift+X. Make sure you’re using mode 3 before continuing.</span></p>
<p style="text-align: center;"><span><img class="size-full wp-image-101 aligncenter" title="Clipping Tool Modes" src="http://files.nacimota.com/2009/10/clipping2.png" alt="Clipping Tool Modes" width="383" height="151" /></span></p>
<p>The method we’re going to use is a five-step clipping process. Steps 1 and 2 involve dividing the target brush in such a way that our working area becomes as small as possible. Although we’re not actually using the carve tool, we’ll keep our carve brush (the cylinder) around for reference. To begin, select the target brush and activate the clipping tool (make sure you’re using mode 3 so we keep both divisions). In the 2D viewport that shows the end faces of the carve brush, drag a vertical line with the clipping tool straight through the vertex on the far left, like so:</p>
<p style="text-align: center;"><img class="size-full wp-image-105 aligncenter" title="Clipping" src="http://files.nacimota.com/2009/10/clipping3.png" alt="Clipping" width="480" height="225" /></p>
<p>Hit enter to execute the clip. Do the same for the vertex on the far right. Now your target brush is split into three divisions; the middle brush should be the same width as the carve brush. Proceeding to step two, select the middle brush – make sure the two side brushes are not selected – and execute horizontal clip through the top vertex. Do the same for the bottom vertex. You may notice that the result is very similar to what the carve tool would have done if we’d used a rectangular carve brush; the difference is that the centre brush would have been removed, which is why we clipped it manually.</p>
<p>Step 3 is to split the centre brush into sections. With the centre brush selected, execute vertical clips through each or the remaining vertices. You may need to decrease the size of the grid to complete the clips accurately; you can change the grid size by pressing the square bracket keys on the keyboard or using the buttons on the toolbar. Once you&#8217;ve clipped the centre brush into vertical slices it&#8217;s time for step 4. Clip each slice along the edge of reference brush. Make sure you only have one slice selected at any one time or you may end up clipping where you&#8217;re not supposed to.</p>
<p>Step 5 is to remove the inner brushes. This is pretty self explanatory. Last but not least is to tie all the inside brushes to a func_detail entity for the sake of optimization; while this isn&#8217;t strictly required, I strongly recommend it.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://files.nacimota.com/2009/10/carve-man.swf" /><embed type="application/x-shockwave-flash" width="500" height="300" src="http://files.nacimota.com/2009/10/carve-man.swf"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nacimota.com/2009/12/07/the-carve-tool-and-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Source Maps with SketchUp</title>
		<link>http://www.nacimota.com/2009/07/13/creating-source-maps-with-sketchup/</link>
		<comments>http://www.nacimota.com/2009/07/13/creating-source-maps-with-sketchup/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 04:06:44 +0000</pubDate>
		<dc:creator>Nacimota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Hammer]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[SketchUp]]></category>
		<category><![CDATA[Source]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.nacimota.com/?p=76</guid>
		<description><![CDATA[Valve released the Left 4 Dead Authoring Tools recently, which included some plugins for Google SketchUp. In this video, I'll show you the basics of exporting SketchUp geometry into the .VMF format. The plugins export generic VMF data, so it works with other Source games too. If you don't have Left 4 Dead, you won't have the Left 4 Dead Authoring Tools, so I've uploaded the SketchUp plugins for anyone who wants them for mapping in other source games:

http://files.nacimota.com/sketchup_plugins.zip <a href="http://www.nacimota.com/2009/07/13/creating-source-maps-with-sketchup/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Valve released the <a title="Left 4 Dead Authoring Tools" href="http://developer.valvesoftware.com/wiki/Authoring_Tools/SDK_(Left_4_Dead)" target="_blank">Left 4 Dead Authoring Tools</a> recently, which included some plugins for Google SketchUp. In this video, I&#8217;ll show you the basics of exporting SketchUp geometry into the .VMF format. The plugins export generic VMF data, so it works with other Source games too. Contrary to what I said in the video, valve has included the plugins with the regular SDK now.</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/JMDNHvFF0Fo&amp;hl=en&amp;fs=1&amp;color1=0x3a3a3a&amp;color2=0x999999" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/JMDNHvFF0Fo&amp;hl=en&amp;fs=1&amp;color1=0x3a3a3a&amp;color2=0x999999" allowfullscreen="true" allowscriptaccess="always"></embed></object></p>
<p style="TEXT-ALIGN: left">I have a cold so my voice is a bit off in places. Send plugin feedback to <a href="mailto:sketchuptools@valvesoftware.com">sketchuptools@valvesoftware.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nacimota.com/2009/07/13/creating-source-maps-with-sketchup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with the Windows Registry</title>
		<link>http://www.nacimota.com/2009/07/03/working-with-the-windows-registry/</link>
		<comments>http://www.nacimota.com/2009/07/03/working-with-the-windows-registry/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 00:15:31 +0000</pubDate>
		<dc:creator>Nacimota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.nacimota.com/?p=20</guid>
		<description><![CDATA[Our website contains many tutorials that require editing the Windows Registry. Rather than summarizing the process in every article, I thought it might be better to make a more in-depth exploration separately. In this tutorial, I will explain what the Windows Registry is, how to edit its contents and the risks associated with doing so.

In the early days of Windows, applications would often store their configuration data in text documents called initialization files. Typically, these files would use an extension like .ini, .txt, .cfg, etc. One of the major problems with this particular system was that with the sheer number of applications installed, the .ini files would become scattered across the file system, making them difficult to track. After the release of Windows 95, in an effort to further standardize and manage configuration for applications and Windows, Microsoft encouraged software developers to use the Windows Registry as an alternative to INI files for storing configuration data. In the years that followed, the Windows Registry became the standard repository for application settings. <a href="http://www.nacimota.com/2009/07/03/working-with-the-windows-registry/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>Our website contains many tutorials that require editing the Windows Registry. Rather than summarizing the process in every article, I thought it might be better to make a more in-depth exploration separately. In this tutorial, I will explain what the Windows Registry is, how to edit its contents and the risks associated with doing so.</em></p>
<p>In the early days of Windows, applications would often store their configuration data in text documents called initialization files. Typically, these files would use an extension like .ini, .txt, .cfg, etc. One of the major problems with this particular system was that with the sheer number of applications installed, the .ini files would become scattered across the file system, making them difficult to track. After the release of Windows 95, in an effort to further standardize and manage configuration for applications and Windows, Microsoft encouraged software developers to use the Windows Registry as an alternative to INI files for storing configuration data. In the years that followed, the Windows Registry became the standard repository for application settings.<span id="more-20"></span></p>
<p>Today, XML files are gaining popularity with developers as a new medium for storing application configuration data for a variety of reasons. However, the registry remains a very important component of Windows; for software developers and windows power users, the ability to manipulate it is an essential skill.</p>
<p>The Windows Registry is essentially a large hierarchical database. Its structure is not unlike that of the Windows file system. Data is stored in entries called values, which are stored in collections called keys. A key in regards to the registry is in essence, a folder of sorts. Keys usually contain a collection of values and sometimes subkeys, not unlike a folder filled with files and subfolders. This makes keys a little confusing, because typically the word ‘key’ in computing refers to the name part of a value in an associative array. Value in terms of the registry refers to both the name and the value of the entry. This is because in the earliest versions of Windows (3.1 and prior), keys in the registry could not contain multiple name/value pairs; it only contained a single value which was tied to the key itself. In this scenario, the structure of the registry much more resembles an associative array and the term ‘key’ makes perfect sense. The elements of the registry have not been given more appropriate names since.</p>
<p>Keys in the registry are arranged into logical groups called hives. The hives that make up the registry are stored in multiple files in various directories on the system (mainly %SystemRoot%\System32\config). Below is a list of the standard hives and their supporting files, according to Microsoft:</p>
<p style="TEXT-ALIGN: center"><img class="aligncenter size-full wp-image-49" title="Registry Hives" src="http://www.nacimota.com/files/2009/07/registry1.jpg" alt="Registry Hives" width="550" height="210" /></p>
<p>At the root of the registry there are typically five main keys visible in the registry editor, they are as follows:</p>
<p><strong>HKEY_CLASSES_ROOT (HKCR)</strong><br />
HKCR contains data concerning the relationships between applications and other items, such as file type associations. It is essentially a compilation of the classes stored in HKCU and HKLM.</p>
<p><strong>HKEY_CURRENT_USER (HKCU)</strong><br />
HKCU contains configuration data specific to the currently logged in user. The contents of HKCU are just a reflection of the data in HKU relating to the current user profile. As shown in the table above, all of the data in the HKCU hive is stored in a .dat file located in the user’s root folder (typically %SystemDrive%\Documents and Settings\&lt;Username&gt; or %SystemDrive%\Users\&lt;Username&gt; depending on the operating system).</p>
<p><strong>HKEY_LOCAL_MACHINE (HKLM)</strong><br />
HKLM contains settings for all users on the machine, rather than any specific user. As in HKCU, HKLM sorts driver and services information in the SYSTEM key, and configuration for windows and applications in the SOFTWARE key.</p>
<p><strong>HKEY_USERS (HKU)</strong><br />
HKU contains everything in HKCU as well as the same data for every other user on the machine. It also describes the default configuration for new users.</p>
<p><strong>KEY_CURRENT_CONFIG (HKCC)</strong><br />
HKCC contains data relating to the current hardware profile of the machine. Technically, it only contains information describing the difference between the current configuration and the standard configuration, which is stored in the SOFTWARE and SYSTEM keys of HKLM. HKCC is actually just a mirror of the contents in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Hardware Profiles\Current.</p>
<p>The Windows Registry cannot be more than 512 levels in depth, and no more than 32 levels can be created at once with a single API call.</p>
<p>Because virtually every Windows setting is stored in the registry, it is the ultimate tool when it comes to system configuration. For more or less the same reason, the registry can also be very dangerous if misused. Incorrect configuration of certain parts of the registry can cause a variety of problems, including rendering the operating system unusable. Centralizing system configuration makes settings more accessible to the operating system. Registry settings can be applied to users en masse via group policy, and the entire registry is relatively simple to back up. Due to the way the registry is stored on the system, storing strongly typed data is possible and parsing data is not necessary as it is with INI files, which results in faster reads. On the other hand, the registry’s binary structure also makes damage much harder to repair.</p>
<p>The easiest way to manipulate the registry is via the Registry Editor, which is a component of Windows. By default, there are no shortcuts to the Registry Editor, so we&#8217;re going to have to start it a little differently than most applications.</p>
<p>Open the start menu and click Run. Type <em>regedit</em> and hit enter. We could type the full address to the Registry Editor, but it just so happens that it is stored in the <em>system32</em> folder, which is where Run looks if an absolute path is not specified. If you&#8217;re using Windows Vista or Windows 7, just type <em>regedit</em> in the search box at the bottom of the start menu and hit enter.</p>
<p>At first glance, the Registry Editor looks similar to Explorer. You can navigate through keys using the tree on the left side of the window. Unlike explorer, subkeys won&#8217;t be displayed in the list view on the right, so you&#8217;ll have to use the tree to move around the registry. The list view shows each value of the current key. As discussed earlier, a value has its own name, type, and data. For the purposes of demonstration, we&#8217;re going to edit a value. The change we&#8217;re going to make is stopping an application from appearing in the &#8220;frequently used programs&#8221; list in the start menu (present in Windows XP onwards).</p>
<p>Windows keeps a small list of executables that shouldn&#8217;t be included on this list; it keeps this list in the registry of course. The value exists to stop certain system programs and applications that are unlikely to be run more than once from appearing on this list (things like installers and <a title="rundll32" href="http://support.microsoft.com/kb/164787" target="_blank">rundll32</a>). Let&#8217;s say I want to prevent Windows Media Player from appearing on this list (because I already have it on my Quick Launch bar). This value is located in the following key:</p>
<p>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\FileAssociation</p>
<p>The parent keys in the above address basically break down like this:</p>
<p>Settings for the machine (not just this account) &gt;<br />
Settings for software on this machine &gt;<br />
Settings for software manufactured by Microsoft &gt;<br />
Settings for Microsoft Windows &gt;<br />
Settings for the current version of Microsoft Windows &gt;<br />
Settings for explorer (explorer handles the user interface, among other things) &gt;</p>
<p>So use the tree view on the left to navigate to this key. You should see roughly three or four values listed. The one we&#8217;re interested in is called <em>AddRemoveApps</em>; it&#8217;s a REG_SZ which is essentially a string value (a value that contains data composed of a sequence of characters, usually text of some description).</p>
<p>Double click on <em>AddRemoveApps</em> or you can right click on it and select <strong>Modify&#8230; </strong>from the context menu that appears. You should see a small dialog appear captioned &#8220;Edit String&#8221;. This is pretty self explanatory; to edit the value data, change the contents of the second text box and click OK. The contents of mine looks like this:</p>
<p><em>SETUP.EXE;INSTALL.EXE;ISUNINST.EXE;UNWISE.EXE;UNWISE32.EXE;ST5UNST.EXE;RUNDLL32.EXE;MSOOBE.EXE;LNKSTUB.EXE;MSASCUI.EXE</em></p>
<p>So what we have here is a list of executables separated by semicolons. To add Windows Media Player, jump to the end of the string, add a semicolon, then type the executable name:</p>
<p><em>SETUP.EXE;INSTALL.EXE;ISUNINST.EXE;UNWISE.EXE;UNWISE32.EXE;ST5UNST.EXE;RUNDLL32.EXE;MSOOBE.EXE;LNKSTUB.EXE;MSASCUI.EXE;WMPLAYER.EXE</em></p>
<p>You&#8217;ll notice I&#8217;ve typed <em>wmplayer.exe </em>in upper case; this is just for consistency, it isn&#8217;t actually case sensitive. Windows only checks this value when it attempts to add a program to the list, so if Media Player is already on your frequently used programs list, you will have to remove it yourself first (either by clearing the list, or right clicking on it and selecting <em>Remove from This List.).</em></p>
<p>You can also export entire keys (or the registry itself) into .reg files, which are basically text files with a special syntax which Windows can read. When you open a .reg file, Windows attempts to modify the registry based on the contents of the file. Since this is a potentially dangerous thing to do (especially if you don&#8217;t know where the file came from or what its purpose is), Windows will always ask for confirmation before executing a .reg file. If you want to read or edit a .reg file, you can do so with a text editor such as notepad.</p>
<p>Exporting allows you to back up the registry before making changes. In most cases, this isn&#8217;t strictly necessary if you&#8217;re careful, but it is a good practice to establish. To export a key, simply right click on it and select <em>Export.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nacimota.com/2009/07/03/working-with-the-windows-registry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hiding User Accounts on Windows</title>
		<link>http://www.nacimota.com/2009/07/01/hiding-user-accounts-on-windows-xp/</link>
		<comments>http://www.nacimota.com/2009/07/01/hiding-user-accounts-on-windows-xp/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 02:56:47 +0000</pubDate>
		<dc:creator>Nacimota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.nacimota.com/?p=15</guid>
		<description><![CDATA[On Windows XP, it is possible to hide user accounts from both the Welcome Screen and the User Accounts control panel. In this tutorial, I'll show you how. I'm sure people have various reasons for wanting to do this, so here we go. <a href="http://www.nacimota.com/2009/07/01/hiding-user-accounts-on-windows-xp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<blockquote><p><em>Originally published in 2008</em></p></blockquote>
<p><em>On Windows XP and up, it is possible to hide user accounts from both the Welcome Screen and the User Accounts control panel. In this tutorial, I&#8217;ll show you how. I&#8217;m sure people have various reasons for wanting to do this, so here we go.</em></p>
<p>The first thing you want to do is head to the Control Panel and create the user you want to hide, if you haven&#8217;t done so already. I&#8217;m calling mine <em>Secret Account</em>. It&#8217;s important to take not of the exact name of the account, including character case, because we&#8217;ll need to use it later.</p>
<p>Notice that the account is shown in the User Accounts control panel. This is normal, of course.<span id="more-15"></span></p>
<p>If you log out, you&#8217;ll notice that the account is also shown on the Welcome Screen. Once again, standard windows behaviour.</p>
<p>In order to tell Windows to hide the account in both the Control Panel and the Welcome Screen, we need to make an edit to the Windows Registry.</p>
<p>To open the registry editor, select <strong>Run</strong> from the start menu, type <em>regedit</em> and click OK.</p>
<p>Once the Registry Editor opens, browse to the following key:</p>
<p><em>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList</em></p>
<p>In this key, you need to create a new DWORD value. Give it the exact name of the user account (case sensitive). In my case, I&#8217;m calling it <em>Secret Account</em>. The default value for a new DWORD should be <em>0&#215;00000000 (0)</em>, which is the value we want, as it hides the account. If this is not what your DWORD is set to, change it accordingly.</p>
<p>Once you&#8217;re done, close the Registry Editor and the effects should be instantaneous. Head back over to the Control Panel and the affected account should not be visable.</p>
<p>Log out to see the Welcome Screen. You&#8217;ll notice the account is no longer visible here either.</p>
<p>In order to log on using the hidden account, you&#8217;ll need to press <em>Ctr+Alt+Del</em> twice. You will be prompted with the classic NT log on window.</p>
<p>Input your username (case insensitive) and password (case sensitive), and click OK.</p>
<p>You can also use this method to show the Administrator account on XP, which is hidden by default.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nacimota.com/2009/07/01/hiding-user-accounts-on-windows-xp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>User Account Control and You</title>
		<link>http://www.nacimota.com/2009/06/30/7/</link>
		<comments>http://www.nacimota.com/2009/06/30/7/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 10:21:47 +0000</pubDate>
		<dc:creator>Nacimota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[User Account Control]]></category>
		<category><![CDATA[Vista]]></category>

		<guid isPermaLink="false">http://www.nacimota.com/?p=7</guid>
		<description><![CDATA[In this tutorial, I'll discuss disabling and configuring User Account Control (UAC) on Windows Vista, along with the pros and cons of doing so.

User Account Control, or UAC as it's often called, is arguably the most controversial feature of Windows Vista. It's also probably fair to say that it's Vista's most misunderstood feature. <a href="http://www.nacimota.com/2009/06/30/7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<blockquote><p><em>Originally published in 2008</em></p></blockquote>
<p><em>In this tutorial, I&#8217;ll discuss disabling and configuring User Account Control (UAC) on Windows Vista, along with the pros and cons of doing so.</em></p>
<p>User Account Control, or UAC as it&#8217;s often called, is arguably the most controversial feature of Windows Vista. It&#8217;s also probably fair to say that it&#8217;s Vista&#8217;s most misunderstood feature.</p>
<p>UAC prompts you with a &#8216;click-ok-to-continue&#8217;-like dialog whenever you do certain actions. This is often interpreted as &#8220;Are you sure you want to run this program?&#8221; or &#8220;Are you an administrator?&#8221;, which isn&#8217;t quite the case. This prompting behaviour can be jarring for users, as it deviates from the behaviour of previous versions of Windows. Being constantly asked to confirm your actions can be frustrating for users new to the Vista platform. Because of this, many users choose to disable the UAC system all together, and it has become a main point of criticism for Vista.<span id="more-7"></span></p>
<p>Before I explain how to configure and disable UAC, let&#8217;s discuss briefly what it actually does.</p>
<p>In previous versions of Windows (as late as Windows XP), we had two main types of user accounts: Limited Users and Administrators. Limited Users were restricted in what they could do with windows. Most installations, for instance, required authorization from an Administrator. The same was true for various other tasks, such as installing hardware and making system wide changes to the operating system. Administrator accounts, on the other hand, had virtually full access to Windows.</p>
<p>According to Microsoft, most people prefer to use Administrator accounts. This is primarily due to the default account that is created during Windows Setup being an administrator, and also to the fact that users prefer to have full control over their PC. The main security issue with this approach to user policy is that applications are run with the same privileges that the user has. That is, if the user is an administrator, the application runs with administrative privileges. This makes Windows more vulnerable to malicious software than it should be.</p>
<p>Windows Vista takes a different approach to user security policy by implementing the UAC system.</p>
<p>By default in Vista, all programs run with minimal privileges regardless of the account type the user is set to. Without administrative privileges, it is much more difficult for applications to perform potentially harmful operations. However, some applications do have legitimate use for administrative privileges. The prime example would be setup applications, as they require access to areas such as Program Files and the Windows Registry. When an application attempts to do something that requires administrative privileges, it is detected by UAC.</p>
<p>What UAC actually does is tells the user that the application is requesting admin privileges (and thus, higher access to the operating system). The user can then allow or deny administrative access to the application that made the request by answering the UAC prompt. If administrative privileges are granted by the user, the application retains them until it closes.</p>
<p>This system gives users complete control over what applications the operating system exposes itself to, which makes malware a lot less effective.</p>
<p>When Windows Vista was first released in January of 2007, the amount of UAC prompting for regular programs was higher than what would have been tolerable for many people. This is because a lot of Windows software at the time required administrative privileges <em>unecessarily</em>, due primarily to poor programming by the developers. UAC has, perhaps unintentionally, encouraged developers to rewrite their software to work without triggering UAC prompts, which Microsoft argues results in an &#8220;improved software ecosystem&#8221;. The amount of programs that trigger UAC</p>
<p>prompts on Windows Vista has dropped approximately 78% between August of 2007 and August of 2008, which is compelling evidence to support Microsoft&#8217;s claims.</p>
<p>Regardless of UAC&#8217;s beneficial features, many people still find the prompting too intrusive, and turn UAC off as a result. This can be done in the User Accounts section of the control panel, but it&#8217;s not a very good idea.</p>
<p>Disabling UAC causes other Windows components to behave differently, which can cause problems here and there. Since it&#8217;s only the prompting that&#8217;s the issue, it would make more sense to leave UAC on, but turn the prompting off. This can be done.</p>
<p>Windows Vista Ultimate and Windows Vista Business users have access to the Local Security Policy editor, also known as secpol. To run secpol, type secpol.msc in the start menu search box and hit enter (you will be prompted by UAC, go figure).</p>
<p>Under <em>Local Policies &gt; Security Options</em>, there are a whole bunch of settings related to UAC. The two we are interested in are&#8230;</p>
<div id="attachment_8" class="wp-caption alignright" style="width: 310px"><img class="size-medium wp-image-8 " title="secpolUAC" src="http://www.nacimota.com/files/2009/06/secpolUAC-300x189.jpg" alt="UAC elevation prompt settings in the windows Security Policy editor (secpol)" width="300" height="189" /><p class="wp-caption-text">UAC elevation prompt settings in the windows Security Policy editor (secpol)</p></div>
<ul>
<li><em>User Account Control: Behaviour of the elevation prompt for administrators in Admin Approval Mode;</em> and</li>
<li><em>User Account Control: Behaviour of the elevation prompt for standard users</em></li>
</ul>
<p>To turn UAC prompting off, change these (or the one that suits you) to Elevate without prompting.</p>
<p>Instead of actually turning off UAC, this elevates programs to administrative privileges as soon as they are requested, removing the prompting from the process. This will remove the prompts, but remember, it will not protect you from malware &#8211; UAC does not differentiate between good and bad software heuristically or otherwise.</p>
<p>If you&#8217;re a Windows Vista Home Basic or Windows Vista Home Premium user, you do not have secpol. However, most of the settings in secpol just correspond to entries in the Windows Registry, including the two UAC settings above.</p>
<p>To change them, open the registry editor (type regedit in the start menu search box and hit enter).</p>
<p>Browse to the following key:</p>
<p><em>Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System</em></p>
<p>The prompt settings are stored here as DWORD values. They are ConsentPromptBehaviorAdmin and ConsentPromptBehaviorUser.</p>
<p>The possible values for both settings are as follows:</p>
<p><em>0&#215;00000000 (0) &#8211; Elevate without prompting<br />
0&#215;00000001 (1) &#8211; Prompt for credentials<br />
0&#215;00000002 (2) &#8211; Prompt for consent</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nacimota.com/2009/06/30/7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
