<?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>tales from the crypt( ) &#187; windows</title>
	<atom:link href="http://org.against.org/category/windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://org.against.org</link>
	<description>slightly biased and undoubtful pieces of random information</description>
	<lastBuildDate>Mon, 12 Dec 2011 23:21:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Cygwin</title>
		<link>http://org.against.org/cygwin/</link>
		<comments>http://org.against.org/cygwin/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 19:51:47 +0000</pubDate>
		<dc:creator>bruno</dc:creator>
				<category><![CDATA[geek stuff]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[customization]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://org.against.org/?p=148</guid>
		<description><![CDATA[(hey, it&#8217;s a container for some cygwin hacks I stumble upon) Intro: Yes, I&#8217;m a sucker for Cygwin. Being &#8220;forced&#8221; to live inside a few windows boxes on the corporate world made me embrace this tool to escape from a few nazi-ish policies and improve my efficiency when faced with common (and then again, maybe [...]]]></description>
			<content:encoded><![CDATA[<h6>(hey, it&#8217;s a container for some cygwin hacks I stumble upon)</h6>
<p><strong>Intro:</strong></p>
<p>Yes, I&#8217;m a sucker for <a href="http://org.against.org/r.php?http://www.cygwin.com/">Cygwin</a>. Being &#8220;forced&#8221; to live inside a few windows boxes on the corporate world made me embrace this tool to escape from a few nazi-ish policies and improve my efficiency when faced with common (and then again, maybe not) tasks.</p>
<blockquote><p><em>Cygwin is a Linux-like environment for Windows. It consists of two  parts:</em></p>
<ul>
<li><em>A DLL (cygwin1.dll) which acts as a Linux API emulation  layer providing substantial Linux API functionality.</em></li>
</ul>
<ul>
<li><em>A  collection of tools which provide Linux look and feel.</em></li>
</ul>
<p><em>The Cygwin  DLL currently works with all recent, commercially released x86 32 bit  and 64 bit versions of Windows, with the exception of Windows CE.</em></p></blockquote>
<p>Think of it as an advanced Command Prompt for Windows boxes. Developing, debugging,scripting, testing, hacking. All of this can be done inside a Cygwin window  &#8211; just be aware that the standard Cygwin shortcut will just launch a cmd.exe window with a bash shell on it &#8211; for added usefulness, it&#8217;s much more efficient to launch it using the following shortcut:</p>
<pre><span style="font-family: courier; font-size: 80%;">C:\cygwin\bin\rxvt.exe -fn "Lucida Console-11" -bg black
-fg white -ls -st -sr -sl 1500 -C  -e /usr/bin/bash --login</span></pre>
<p><strong>Cygwin packages, the debian way:</strong></p>
<p>Getting a new Cygwin installation running is usually a painful experience for several reasons:</p>
<p>1. As far as I know there is no way to script a complete installation using the setup utility.</p>
<p>2. Selecting packages for installation is a pain in the ass since the setup utility looks like it&#8217;s been designed by a monkey.</p>
<p>3. When an error occurs on installation, chances are your package selection is probably gone.</p>
<p>Truth be told, major revamping on the setup utility has been done on the past few months. It is now possible to search for an individual package by name. Searching for a package that provides a given binary/file/whatever is still very hard to accomplish and/or quite unclear.</p>
<p>However, I&#8217;ve come across an interesting project (one year old, as we speak) that brings the familiar Debian apt-get family commands to install packages. I&#8217;d think about this as a way to jumpstart a Cygwin installation, but it requires bash, wget, tar, gawk and bzip2 to be installed beforehand (and these should be installed on a zero configuration setup run)</p>
<p>Its name is <a href="http://org.against.org/r.php?http://stephenjungels.com/jungels.net/projects/apt-cyg/">apt-cyg</a>. <em>&#8220;a command-line installer for Cygwin which cooperates with Cygwin Setup and uses the same repository.  The syntax is based on apt-get but simplified</em>.&#8221;</p>
<p>With it, installing a full fledged and customized Cygwin setup is just a matter of running setup.exe once, installing the script using the suggested invocation and launching a preexisting shell script which all it does is installing the remaining packages (and dependencies) in one step.</p>
]]></content:encoded>
			<wfw:commentRss>http://org.against.org/cygwin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How-To get your PC serial numbers the easy way</title>
		<link>http://org.against.org/how-to-get-your-pc-serial-numbers-the-easy-way/</link>
		<comments>http://org.against.org/how-to-get-your-pc-serial-numbers-the-easy-way/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 16:17:24 +0000</pubDate>
		<dc:creator>bruno</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[useful stuff]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[dos]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[pc]]></category>
		<category><![CDATA[serial]]></category>
		<category><![CDATA[wmi]]></category>
		<category><![CDATA[wmic]]></category>

		<guid isPermaLink="false">http://org.against.org/how-to-get-your-pc-serial-numbers-the-easy-way/</guid>
		<description><![CDATA[I often find myself crawling under the desk looking for labels or turning around laptops trying to find half-erased and destroyed panels showing computer serial numbers and other cryptic hyeroglyphs. Let me tell you about serial numbers. These are quite useful to keep handy in case your stuff is stolen. Luckily, for most manufacturers like [...]]]></description>
			<content:encoded><![CDATA[<p>I often find myself crawling under the desk looking for labels or turning around laptops trying to find half-erased and destroyed panels showing computer serial numbers and other cryptic hyeroglyphs.</p>
<p>Let me tell you about serial numbers. These are quite useful to keep handy in case your stuff is stolen. Luckily, for most manufacturers like Dell, IBM, Toshiba and HP, there&#8217;s a way to find these without leaving the desk, providing they&#8217;re running some sort of Redmond operating system and using WMIC (Windows Management Instrumentation Command). Custom built systems may not have so much useful information, but it&#8217;s pretty fun nevertheless to peek inside using WMI.</p>
<p>WMIC is available on Windows XP, Windows   2003 and later versions. To use WMI information on older operating systems, download and install <a href="http://org.against.org/r.php?http://www.microsoft.com/downloads/details.aspx?FamilyId=98A4C5BA-337B-4E92-8C18-A63847760EA5&amp;displaylang=en">WMI core for  Win 9x</a> or <a href="http://org.against.org/r.php?http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=C174CFB1-EF67-471D-9277-4C2B1014A31E">WMI core for Win NT 4</a> from Microsoft&#8217;s website.</p>
<p>There are a gazillion values that can be retrieved/changed using WMIC. The     availability of  WMI information does vary across different versions of     Windows and it requires administrator rights to be run.</p>
<p>In Windows 2000, there are around       4000 properties     that can be monitored and around 40 that can be configured. Windows XP raises these numbers to 6000 and 140 respectively.</p>
<p>Now, for instance, to retrieve the serial number of a computer, run the following command on a DOS prompt:</p>
<p><strong>wmic bios get serialnumber<br />
</strong><br />
Or to retrieve the model name (these can get quite cryptic sometimes)  run the following command</p>
<p><strong>wmic csproduct get name<br />
</strong></p>
<p>When WMIC is run for the first time, it may take a little time until all possible properties are inventoried. Subsequent    times you run WMIC, it will start  immediately.</p>
<p>Got most of this info from <a href="http://org.against.org/r.php?http://www.ss64.com/nt/wmic.html">http://www.ss64.com/nt/wmic.html</a></p>
<p>As usual , YMMV and Microsoft&#8217; <a href="http://org.against.org/r.php?http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_reference.asp">MSDN full WMI reference</a> may provide some extended reading and reference on the subject.</p>
]]></content:encoded>
			<wfw:commentRss>http://org.against.org/how-to-get-your-pc-serial-numbers-the-easy-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo/Topography Maps on Garmin GPS Receivers</title>
		<link>http://org.against.org/howtotopography-maps-on-garmin-gps-receivers/</link>
		<comments>http://org.against.org/howtotopography-maps-on-garmin-gps-receivers/#comments</comments>
		<pubDate>Tue, 17 Apr 2007 00:20:35 +0000</pubDate>
		<dc:creator>bruno</dc:creator>
				<category><![CDATA[geek stuff]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[60cs]]></category>
		<category><![CDATA[60csx]]></category>
		<category><![CDATA[cgp]]></category>
		<category><![CDATA[contour lines]]></category>
		<category><![CDATA[garmin]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[quest]]></category>
		<category><![CDATA[topography]]></category>

		<guid isPermaLink="false">http://org.against.org/howtotopography-maps-on-garmin-gps-receivers/</guid>
		<description><![CDATA[This process will let you build custom topography maps based on freely available map tiles. These maps can be then uploaded to your Garmin GPS receiver, along with the maps you&#8217;ve already got (CitySelect or CityNavigator, for instance), providing a transparent layer with contour lines. The process has been know to work in a number [...]]]></description>
			<content:encoded><![CDATA[<p>This process will let you build custom topography maps based on freely available map tiles. These maps can be then uploaded to your Garmin GPS receiver, along with the maps you&#8217;ve already got (CitySelect or CityNavigator, for instance), providing a transparent layer with contour lines. The process has been know to work in a number Garmin GPS receivers, given they have enought memory to store the maps. A few examples of these are the <a href="http://org.against.org/r.php?http://www.garmin.com/products/gpsmap60cs" class="external">GPSMAP 60CS</a>, the <a href="http://org.against.org/r.php?http://www.garmin.com/products/quest" class="external">Quest</a> or the <a href="http://org.against.org/r.php?http://www.garmin.com/products/gpsmap60csx" class="external">GPSMAP 60CSx</a></p>
<p><img src="http://org.against.org/wp-content/uploads/f8285b42b14558abdata.png" alt="mapsource" /></p>
<p><strong>DISCLAIMER:</strong><br />
<strong>This tutorial in based on an original document by Paulo Henriques (in Portuguese) which can be obtained <a href="http://org.against.org/r.php?http://against.org/mirror/Altimetria.zip" class="external">here</a>. This is a mere translation with some comments about my experience.</strong></p>
<p><strong>This is an experimental process. If you brick your GPS by using this hack, it is not my fault, you have been warned. It&#8217;s been known to work on most of the devices and the worst thing that happened was a registry corruption which was fixed by re-installing Mapsource.</strong></p>
<p><a href="http://org.against.org/r.php?http://gpsmaps.de" class="external">GPSMaps.de</a> has some topographic maps available free-of-charge generated by publicly available databases (digital elevation model published by the United States Geological Survey) and converted to the Garmin img format which can be loaded to Garmin GPS receivers. These maps provide essential information on the topography for mountaineers and hikers. Contrary to the &#8220;topo&#8221; line of Garmin maps, these maps will only provide &#8220;visual&#8221; cues of altitude (contour lines).</p>
<p>There are alternative ways to accomplish this task. Sendmap (available on the <span class="external"><a href="http://org.against.org/r.php?http://www.cgpsmapper.com/">cGpsMapper</a> </span><a href="http://org.against.org/r.php?http://gps.chrisb.org/en/main.htm" class="external"></a> package) can be used to upload these maps to the GPS device, but if you use this approach, you&#8217;ll be able to treat these maps as any other Mapsource map (mainly identify which tiles you&#8217;ll want to upload) and manage available memory more eficiently, by combining sets of maps from different sources at the same time.</p>
<p>1. Register on <a href="http://org.against.org/r.php?http://gpsmaps.de" class="external">http://gpsmaps.de</a> (use the contact form) to obtain a user/password which will let you download the individual map tiles. The user and password will be shown on the browser as soon as you press the submit button. Altough you can use bogus data, it would be nice to fill up the form and thank the map provider for sharing his work with everyone else.</p>
<p>2. On the map selection page, choose the area you want map tiles from. Each european map tile covers a 0.5 degree x 0.5 degree area, so be ready to download a lot of files and to keep track of what you&#8217;ve got and what you want. As soon as you ask for the first tile, you&#8217;ll be asked the username and password you just got by registering. As an example, Portugal has 59 tiles (around 21Mb of .img files).</p>
<p>3. Once you have collected all the map tiles, you&#8217;ll have to prepare them to be used with Mapsource. This can be accomplished in two steps:</p>
<p>3.1. <strong>Hacking the registry creating a map entry for the maps you&#8217;re about to import</strong>:<br />
Just copy/paste the text below into a new file called Topographic.reg</p>
<pre>

Windows Registry Editor Version 5.00  

[HKEY_LOCAL_MACHINE\SOFTWARE\Garmin\MapSource\Products\669]
Bmap=C:\Maps\GarminCustom\TopographicCustom.img
Loc=C:\Maps\GarminCustom\
Tdb=C:\Maps\GarminCustom\TopographicCustom.tdb</pre>
<p>This file is a Windows registry file which will tell Mapsource to use the maps at that specific location. Pathnames and filenames are important. In this example, C:\Maps\GarminCustom is used as a base path for all operations we&#8217;ll be performing, and this is the path where Mapsource will, from now on, look for these maps.</p>
<p>3.2. <strong>Creating a preview file (.img) and a catalog file (.tdb) for use with Mapsource</strong>:<br />
3.2.1. Copy/paste the text below into a new file called <em>Topographic.txt</em>:</p>
<pre>

[Map]
FileName=TopographicCustom
MapVersion=100
ProductCode=62
Color=32
Levels=2
Level0=14
Level1=13
Zoom0=5
Zoom1=6
MapsourceName=TopographicCustom
MapSetName=TopographicCustom
CDSetName=TopographicCustom
Copy1=Garmin
Copy2=Stan
[End-Map]   

[DICTIONARY]
Level0RGN10=000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Level1RGN10=000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Level0RGN20=111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Level1RGN20=111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Level0RGN40=111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Level1RGN40=111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Level0RGN80=111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Level1RGN80=111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
[END-DICTIONARY]  

[Files]
img=C:\Maps\GarminCustom\20094669.img
img=C:\Maps\GarminCustom\20094668.img
img=C:\Maps\GarminCustom\20094667.img
[END-Files]</pre>
<p>This file will be the configuration file for CGpsMapper. Edit the [Files] section, adding one line matching the map filename for each map you&#8217;ve downloaded before. Save it on the same folder the maps are (C:\Maps\GarminCustom).</p>
<p>3.2.2 Download CGpsMapper <a href="http://org.against.org/r.php?http://www.cgpsmapper.com/"><span class="external">here</span></a>.<br />
3.2.3 Open up a command prompt, change to the C:\Maps\GarminCustom directory and execute the following command:</p>
<pre>cgpsmapper.exe pv C:\Maps\GarminCustom\Topographic.txt</pre>
<p>CGpsMapper creates a lot of output. Look out for error messages such as missing files. If everything went right, you should be having by now two new files at the current directory: TopographicCustom.tdb and TopographicCustom.img (these files are the same referenced on the registry file you created before).</p>
<p>4. Make sure all the files are in the right places. For simplicity and consistency, I opted to put them all on the same place (C:\Maps\GarminCustom)</p>
<p>5. Backup your registry (just in case) and then double-click the registry file you created on step 3.1 and import the new setting into the Mapsource configuration. The next time you open Mapsource, you&#8217;ll have a new set of maps you can download to the GPS.</p>
<p><img src="http://org.against.org/wp-content/uploads/41cd8a3d723c0ea7data.png" alt="mapsource" /></p>
]]></content:encoded>
			<wfw:commentRss>http://org.against.org/howtotopography-maps-on-garmin-gps-receivers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sysinternals (1998-2006)</title>
		<link>http://org.against.org/sysinternals/</link>
		<comments>http://org.against.org/sysinternals/#comments</comments>
		<pubDate>Tue, 18 Jul 2006 19:17:31 +0000</pubDate>
		<dc:creator>bruno</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[blue screen of death]]></category>
		<category><![CDATA[BSOD]]></category>
		<category><![CDATA[filemon]]></category>
		<category><![CDATA[internals]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[process explorer]]></category>
		<category><![CDATA[screensaver]]></category>
		<category><![CDATA[sysinternals]]></category>
		<category><![CDATA[tcpview]]></category>

		<guid isPermaLink="false">http://org.against.org/?p=38</guid>
		<description><![CDATA[Wow. Sysinternals has been acquired by Microsoft There was a time where Microsoft was known for buying small startups that looked like some kind of threat or offered software pieces tightly binded to Windows (and most of all, popular) so that these could slowly be bundled with their software. Most of these software solutions ended [...]]]></description>
			<content:encoded><![CDATA[<p>Wow. <a href="http://org.against.org/r.php?http://www.sysinternals.com/blog/2006/07/on-my-way-to-microsoft.html">Sysinternals has been acquired  by Microsoft</a></p>
<p>There was a time where Microsoft was known for buying small startups that looked like some kind of threat or offered software pieces tightly binded to Windows (and most of all, popular) so that these could slowly be bundled with their software. Most of these software solutions ended up in oblivion or squashed in the process of building &#8220;better, faster and secure&#8221; applications (and I&#8217;m quoting). I just hope these guys have better luck today and achieve what they&#8217;re looking for, <em>&#8220;making Windows an even better platform for all of us&#8221;</em>. We all know what they&#8217;re capable of&#8230;<br />
Go grab your copies of <a href="http://org.against.org/r.php?http://www.sysinternals.com/Utilities/TcpView.html">TCPView</a>, <a href="http://org.against.org/r.php?http://www.sysinternals.com/Utilities/Filemon.html">Filemon</a>, <a href="http://org.against.org/r.php?http://www.sysinternals.com/Utilities/Regmon.html">Regmon</a> and <a href="http://org.against.org/r.php?http://www.sysinternals.com/Utilities/ProcessExplorer.html">Process Explorer</a> while you can and save them to your USB pendrives. These utilities are priceless, a must have for every sysadmin and should have been part of the operating system from the dawn of ages.</p>
<p><small>(If you&#8217;re feeling in the mood for a practical joke, replace some default screensavers for <a href="http://org.against.org/r.php?http://www.sysinternals.com/Utilities/BlueScreen.html">BlueScreen</a> too&#8230;)</small></p>
]]></content:encoded>
			<wfw:commentRss>http://org.against.org/sysinternals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sudo for Windows</title>
		<link>http://org.against.org/sudo-for-windows/</link>
		<comments>http://org.against.org/sudo-for-windows/#comments</comments>
		<pubDate>Sun, 25 Jun 2006 02:18:01 +0000</pubDate>
		<dc:creator>bruno</dc:creator>
				<category><![CDATA[geek stuff]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[useful stuff]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[runas]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://org.against.org/?p=31</guid>
		<description><![CDATA[Now, an interesting piece of software. I wonder why did it take so long for someone to come up with this. Sudo for Windows (sudowin) allows authorized users to launch processes with elevated privileges using their own passphrase. Unlike the runas command, Sudo for Windows preserves the user&#8217;s profile and ownership of created objects. It&#8217;a [...]]]></description>
			<content:encoded><![CDATA[<p>Now, an interesting piece of software. I wonder why did it take so long for someone to come up with this. <em>Sudo for Windows (sudowin) allows authorized users to launch  					processes with elevated privileges using their own passphrase.  					Unlike the runas command, Sudo for Windows preserves the  					user&#8217;s profile and ownership of created objects. </em>It&#8217;a also different from the <em>runas</em> command, as the user will  use his own  password (with the right configuration) to elevate the privileges while  running a particular application.</p>
<p><a href="http://org.against.org/r.php?http://sudowin.sourceforge.net/"> http://sudowin.sourceforge.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://org.against.org/sudo-for-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

