<?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>phaq &#187; Windows</title>
	<atom:link href="http://phaq.phunsites.net/category/faq/operating-systems/windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://phaq.phunsites.net</link>
	<description>my daily IT madness</description>
	<lastBuildDate>Sun, 05 Feb 2012 21:06:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Sharing Windows 7 between Boot Camp and VirtualBox</title>
		<link>http://phaq.phunsites.net/2011/03/05/sharing-windows-7-between-boot-camp-and-virtualbox/</link>
		<comments>http://phaq.phunsites.net/2011/03/05/sharing-windows-7-between-boot-camp-and-virtualbox/#comments</comments>
		<pubDate>Sat, 05 Mar 2011 11:36:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://phaq.phunsites.net/?p=454</guid>
		<description><![CDATA[I always used to have Windows installed through Boot Camp on my MacBook Pro. The reason for it being simple: I need it for some games On the other hand, I use OS X for my primary work, but again, sometimes there&#8217;s no way around Windows. So I had the same Windows installed again within [...]]]></description>
			<content:encoded><![CDATA[<p>I always used to have Windows installed through Boot Camp on my MacBook Pro. The reason for it being simple: I need it for some games <img src='http://phaq.phunsites.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
On the other hand, I use OS X for my primary work, but again, sometimes there&#8217;s no way around Windows. So I had the same Windows installed again within VirtualBox.</p>
<p>Well, what a waste of valuable disk space. So, after I got my new MacBook Pro, equipped with an SSD, I decided to go for it and share the Boot Camp partition between Windows 7 running natively and VirtualBox.<br />
<span id="more-454"></span><br />
Actually, there exist a lot of posts on this topic already. So here&#8217;s a few I came across:</p>
<ul>
<li><a href="http://luckyviplav.wordpress.com/2010/07/17/windows-7-on-mac-os-x-through-virtual-box/" target="_blank">Windows 7 on Mac OS X through Virtual Box</a></li>
<li><a href="http://buschi.org/2009/11/windows-7-bootcamp-installation-mit-virtual-box-nutzen/" target="_blank">Windows 7 Bootcamp Installation mit Virtual Box nutzen (in german)</a></li>
<li><a href="http://www.kevinrockwood.info/2010/04/windows7-in-osx-with-bootcamp-and-virtualbox/" target="_blank">Windows7 in OSX with Bootcamp and Virtualbox</a></li>
<li><a href="http://dashes.com/anil/2009/10/how-to-run-windows-7-under-mac-os-x-106-for-free.html" target="_blank">How to run Windows 7 under Mac OS X 10.6 for free</a></li>
</ul>
<p>The best and most complete one is IMHO <a href="http://luckyviplav.wordpress.com/2010/07/17/windows-7-on-mac-os-x-through-virtual-box/" target="_blank">luckypiplav&#8217;s howto</a>, as it already covers most of the issues and caveats.</p>
<p>So my today&#8217;s post will be sort of an aggregate of all these posts before. I&#8217;m not trying to duplicate, my focus is to show what I had to do to get my setup working for me.</p>
<p>To begin with, here&#8217;s a short summary of my specs:</p>
<ul>
<li>Apple MacBook Pro 15&#8243;, February 2011 model, equipped with an 120 GiB SSD instead of a 500 GiB hard drive</li>
<li>OS X 10.6.6 on HFS partition (80 GiB)</li>
<li>Windows 7 SP 1 on Boot Camp partition (40 GiB)</li>
</ul>
<h4>Install Windows 7 through Boot Camp</h4>
<p>I&#8217;m not going to loose big words on this. I used the Boot Camp assistant to prepare the hard drive for installation.<br />
My hard drive was split into a 80 GiB partition for OS X and a 40 GiB partition for Windows 7.<br />
The process is straight forward. For those not so familiar with it, <a href="http://dashes.com/anil/2009/10/how-to-run-windows-7-under-mac-os-x-106-for-free.html" target="_blank">here&#8217;s a howto</a>.</p>
<p>After completing Windows 7 setup I first installed SP1 and all additional updates. I also activated the Windows 7 license. Then I booted right back into OS X.</p>
<h4>Setup RAW partition access</h4>
<p>Oh well, here&#8217;s some tech stuff to go through. This is also one of the things I dislike about all the other posts on this topic (sorry guys, I&#8217;m just honest): Everyone tells you to do some shell magic trickery, like write access to the partition device files. However, if your setup is only slightly different, you&#8217;re most likely doomed <img src='http://phaq.phunsites.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>So, let&#8217;s start on looking up the partition information first. For this you need to launch Disk Utility first.<br />
My screen shots are from a german language OS X, but for the sake of demonstration purpose, this will be sufficient.</p>
<p>On the main window, click your Boot Camp partition first and the &#8220;Information&#8221; icon second.</p>
<p><a href="http://phaq.phunsites.net/files/2011/03/img1.png" rel="lightbox[454]"><img src="http://phaq.phunsites.net/files/2011/03/img1.png" alt="" width="241" height="256" class="aligncenter size-full wp-image-456" /></a></p>
<p>This will reveal the partition information. The most important thing for us to work with, is the partition ID, which in my case reads &#8220;disk0s3&#8243; (first disk, 3rd slice). In most cases this will be identical for you, but chances are, that it&#8217;s not. If it reads something different for you, then use this instead.</p>
<p><a href="http://phaq.phunsites.net/files/2011/03/img2.png" rel="lightbox[454]"><img src="http://phaq.phunsites.net/files/2011/03/img2-300x217.png" alt="" width="300" height="217" class="aligncenter size-medium wp-image-457" /></a></p>
<p>Now open up Terminal. Your starting directory in Terminal is usually your home directory, which evaluates to /Users/USERNAME. In my case it&#8217;s /Users/Gianpaolo. You can always verify your current location using the &#8220;pwd&#8221; (Print Working Directory) command.<br />
I store all my VM related stuff in my home directory in a folder called &#8220;VirtualBox VMs&#8221;, so I change to this directory and create a new folder for the new Windows 7 VM.</p>
<p><code><br />
cd "VirtualBox VMs"<br />
mkdir Win7onMBP<br />
cd Win7onMBP<br />
</code></p>
<p>Now, we need to grant permissions to the partition we inspected before. Rembember, mine was &#8220;disk0s3&#8243;? Don&#8217;t forget to use the one, that correctly applies to your system.<br />
Note: You&#8217;ll be asked to enter your password to run this command:</p>
<p><code><br />
sudo chmod 777 /dev/disk0s3<br />
</code></p>
<p>You will also need to eject the Boot Camp volume, in case it&#8217;s mounted.<br />
Note: If you decided to format your Boot Camp partition with NTFS, then it won&#8217;t be accessible from OS X. In this case, it won&#8217;t be mounted as well. This is the case for me, so I effectively left this step out.</p>
<p><code><br />
diskutil umount /Volumes/BOOTCAMP<br />
</code></p>
<p>To have this settings parmenently applied to the system, you will need to add them to the local boot script. For this purpose, we use the &#8220;nano&#8221; command, a simple text editor which is simpler to use then &#8220;vi&#8221;. Just type and quit using the &#8220;CTRL-X&#8221; key stroke.<br />
Chances are that this file does not yet exist, but never mind, it&#8217;ll be created automatically.</p>
<p><code><br />
sudo nano /etc/rc.local<br />
</code></p>
<p>Add the following text to your rc.local file:</p>
<p><code><br />
# grant VirtualBox permissions to Boot Camp partition<br />
#<br />
chmod 777 /dev/disk0s3<br />
diskutil umount /Volumes/BOOTCAMP<br />
</code></p>
<p><a href="http://phaq.phunsites.net/files/2011/03/img3.png" rel="lightbox[454]"><img src="http://phaq.phunsites.net/files/2011/03/img3-300x205.png" alt="" width="300" height="205" class="aligncenter size-medium wp-image-458" /></a></p>
<p>Again, if the Boot Camp volume is NTFS formatted, it won&#8217;t be mounted anyway, so the &#8220;diskutil&#8221; line can be omitted in this case.<br />
Type &#8220;CTRL-X&#8221; to save and exit.</p>
<p>Now it&#8217;s time to create the RAW disk file for use with VirtualBox. For this, you should be inside the VM directory we created previously. If in doubt, check this using the &#8220;pwd&#8221; command. From here, run the following command:</p>
<p><code><br />
sudo VBoxManage internalcommands createrawvmdk -rawdisk /dev/disk0 -filename win7raw.vmdk -partitions 3<br />
</code></p>
<p>Please note that this time, you won&#8217;t need to give the whole &#8220;disk0s3&#8243; string to the command above. Instead leave the last two characters away, just stating the physical disk name, which is &#8220;disk0&#8243;. You will need however to supply the partition number &#8220;3&#8243; taken from the &#8220;disk0s3&#8243; string to the &#8220;-partitions&#8221; argument as seen above.</p>
<h4>Create the VM</h4>
<p>Simply follow the instructions of <a href="http://luckyviplav.wordpress.com/2010/07/17/windows-7-on-mac-os-x-through-virtual-box/" target="_blank">luckyviplav&#8217;s howto</a>.</p>
<p>Important to note however: As of VirtualBox 4.x, the disk drives are always attached to a SATA controlled, as shown on the screenshot below.<br />
It is effectively required to remove the disk from the SATA controller and attach it to the IDE controller as primary master instead. Also do not forget to set the IDE controller type to &#8220;ICH6&#8243;, otherwise you&#8217;ll get a &#8220;STOP: 0x0000007B&#8221; BSOD (Inaccessible Boot Device)&#8221;.</p>
<p><a href="http://phaq.phunsites.net/files/2011/03/img4.png" rel="lightbox[454]"><img src="http://phaq.phunsites.net/files/2011/03/img4-300x213.png" alt="" width="300" height="213" class="aligncenter size-medium wp-image-459" /></a></p>
<p><a href="http://phaq.phunsites.net/files/2011/03/img5.png" rel="lightbox[454]"><img src="http://phaq.phunsites.net/files/2011/03/img5-300x212.png" alt="" width="300" height="212" class="aligncenter size-medium wp-image-460" /></a></p>
<p>I strongly recommend to keep the SATA controller in the VM profile. This will have the SATA drivers automatically installed during your first boot.</p>
<h4>First Boot and driver installation</h4>
<p>So you&#8217;re now ready to boot your VM off the Boot Camp partition.<br />
This will cetainly take a while as all the drivers need to be installed. Please take the chance to also install the VirtualBox guest additions.</p>
<p>Note: If you want 3D acceleration, you&#8217;ll need to install the VirtualBox drivers from safe mode (press F8 during boot to get into safe mode).</p>
<h4>Optional: Re-attach boot drive to SATA controller</h4>
<p>One of the most dramatic performance improvements for VirtualBox is the use of the virtual SATA controller in favor of the IDE controller.<br />
So after you successfully installed all the drivers including the VirtualBox guest additions to your VM shut it down first. Then open your VM settings in VirtualBox and navigate to the storage controller section. Remove the hard drive from the IDE controller and re-attach it to the SATA controller. I asked you to keep it there in the first place so the drivers could be installed, remember?</p>
<p>During the next boot, Windows will automatically pick up the disk from the SATA controller and use this for booting.</p>
<p>As a result overall performance in VirtualBox will be a little snappier as with the IDE controller, which also used a bit more CPU power than the SATA controller.</p>
<p>So here&#8217;s finally our Windows 7 VM bootet off the Boot Camp partition. And yet, it&#8217;s still possible to run the very same Windows 7 natively by booting directly into Boot Camp.</p>
<p><a href="http://phaq.phunsites.net/files/2011/03/img10.png" rel="lightbox[454]"><img src="http://phaq.phunsites.net/files/2011/03/img10-300x241.png" alt="" width="300" height="241" class="aligncenter size-medium wp-image-466" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2011/03/05/sharing-windows-7-between-boot-camp-and-virtualbox/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>&#8220;DLL HELL&#8221; oder &#8220;Als GreenCube mit COMDLG32.OCX nicht zusammenspielte&#8221;</title>
		<link>http://phaq.phunsites.net/2010/12/21/dll-hell-oder-als-greencube-mit-comdlg32-ocx-nicht-zusammenspielte/</link>
		<comments>http://phaq.phunsites.net/2010/12/21/dll-hell-oder-als-greencube-mit-comdlg32-ocx-nicht-zusammenspielte/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 22:42:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://phaq.phunsites.net/?p=433</guid>
		<description><![CDATA[Ganz den üblichen Gepflogenheiten dieses Blogs zum Trotz wird dieser Beitrag ausnahmsweise in Deutsch abgefasst, dies aus der Überlegung heraus, dass hier ein &#8220;lokales&#8221; Interesse überwiegen dürfte. Im Rahmen eines Freundschaftsdienstes habe ich CEYA Beaty &#038; Wellnes SPA bei der Installation der greenCube Business Software in einer Client-Server-Umgebung unterstützt. Eigentlich würde ich auch mal eine [...]]]></description>
			<content:encoded><![CDATA[<p>Ganz den üblichen Gepflogenheiten dieses Blogs zum Trotz wird dieser Beitrag ausnahmsweise in Deutsch abgefasst, dies aus der Überlegung heraus, dass hier ein &#8220;lokales&#8221; Interesse überwiegen dürfte.</p>
<p>Im Rahmen eines Freundschaftsdienstes habe ich <a href="http://www.ceya.ch" target="_blank">CEYA Beaty &#038; Wellnes SPA</a> bei der Installation der <a href="http://www.greencube.ch" target="_blank">greenCube Business Software</a> in einer Client-Server-Umgebung unterstützt.</p>
<p>Eigentlich würde ich auch mal eine kurze Anleitung für die Client-Server-Installation verfassen, da die <a href="http://www.greencube.ch/#maindiv&#038;TT&#038;Elements&#038;TT&#038;DownloadMore&#038;TT&#038;|BL|maindiv|BL|Elements|BL|Tutorials" target="_blank">offizielle Anleitung</a> in meinen Augen doch etwas dürftig ausgefallen ist. Aber da &#8220;man&#8221; wohl auch seine Support-Dienstleistungen an den Mann bringen möchte, wäre das wohl ein wenig zu sehr im fremden Revier gewildert, oder? <img src='http://phaq.phunsites.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Hier geht&#8217;s nun allerdings erstmal um einen recht spezifischen Fehler, der bei der Client-Installation unter Windows Vista aufgetreten ist.<br />
<span id="more-433"></span><br />
Zum einen will ich kurz anmerken, dass der Hinweis im Installations-FAQ, dass die Benutzerkontensteuerung unter Windows Vista bzw. Windows 7 tunlichts abzuschalten ist, nicht von ungefähr kommt.</p>
<div align="center">
<a href="http://phaq.phunsites.net/files/2010/12/prereq_note.png" rel="lightbox[433]"><img src="http://phaq.phunsites.net/files/2010/12/prereq_note-300x136.png" alt="" title="prereq_note" width="300" height="136" class="aligncenter size-medium wp-image-439" /></a>
</div>
<p>Das geht zurück auf den Umstand, dass gewisse Setup-Programme Komponentenregistrierungen nicht sauber durchführen können.<br />
Einen Fehler in der Installation von Office 2003 liegt im selben Verhalten begründet, worüber ich bereits in <a href="http://phaq.phunsites.net/2007/04/01/error-1913-while-installing-office-2003-on-vista/">einem anderen Beitrag berichtet</a> hatte.</p>
<p>Also UAC (Benutzerkontensteuerung) für die Installation auf jeden Fall ausschalten.</p>
<p>Allerdings muss ich auch ehrlich anmerken: Im Jahr 2010, also fast vier Jahre nach dem Release von Windows Vista und ein Jahr nach dem Release von Windows 7 finde ich es eine Zumutung, dass einer &#8220;neuen Software&#8221; mit so einem Murks auf die Beine geholfen werden muss.<br />
Es gibt zuhauf aktueller Software am Markt, die auch ohne diesen Behelf installiert werden kann.</p>
<p>Nun denn, wenn die Installationshürde erstmal geschaft ist, dürfte greenCube in 99 % aller sauber installiert sein und auch funktionieren.</p>
<p>In meinem Fall war dem leider nicht so. So wurde bereits unmittelbar nach dem Programmstart eine Reihe von Fehlermeldungen angezeigt, welche auf typische Registrierungsfehler von OCX-Komponenten (COMDLG32.OCX und MXCOMCT2.OCX) hinwiesen.<br />
Anschliessend wurde die Anwendung mit einer vielsagenden Meldungen geschlossen:</p>
<p>&#8220;Automatisierungsfehler. Der aufgerufene (Server, nicht die Serveranwendung) ist nicht verfügbar und kann nicht gefunden werden. Alle Verbindungen sind ungültig. Eventuell wurde der Aufruf ausgeführt.&#8221;</p>
<div align="center">
<a href="http://phaq.phunsites.net/files/2010/12/1.png" rel="lightbox[433]"><img src="http://phaq.phunsites.net/files/2010/12/1-300x109.png" alt="" title="1" width="300" height="109" class="aligncenter size-medium wp-image-434" /></a>
</div>
<div>&nbsp;</div>
<div align="center">
<a href="http://phaq.phunsites.net/files/2010/12/2.png" rel="lightbox[433]"><img src="http://phaq.phunsites.net/files/2010/12/2-300x120.png" alt="" title="2" width="300" height="120" class="aligncenter size-medium wp-image-435" /></a>
</div>
<div>&nbsp;</div>
<div align="center">
<a href="http://phaq.phunsites.net/files/2010/12/3.png" rel="lightbox[433]"><img src="http://phaq.phunsites.net/files/2010/12/3-300x141.png" alt="" title="3" width="300" height="141" class="aligncenter size-medium wp-image-436" /></a>
</div>
<p>Ganz abgesehen davon, dass die Fehlermeldung für den Laien absolut nichtssagend ist, empfinde ich als besonders amüsant, dass da trotz des offenkundigen Fehlers die Möglichkeit einer &#8220;eventuellen Ausführung von irgendwas&#8221; einbehalten wird. Tja, Windows-Fehlermeldungen eben <img src='http://phaq.phunsites.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Typischerweise haben Anwendungsfehler in Bezug auf OCX- oder DLL-Registrierungsfehler damit zu tun, dass entweder eine ältere Version der geforderten Datei vorhanden ist, oder dass sie gar nicht vorhanden ist oder selbige auch nicht richtig registriert wurde.</p>
<p>Normalerweise lässt sich das recht einfach beheben, indem man überprüft, ob die gewünschten Dateien überhaupt vorhanden sind (zu finden unter C:\Windows\System32), diese andernfalls nachinstalliert und manuell mit folgendem Befehl registriert:</p>
<p><code><br />
regsvr32 %SystemRoot%\system32\DATEINAME.ocx<br />
</code></p>
<p>So geschehen auch bei unserem Problemkind-PC&#8230;</p>
<div align="center">
<a href="http://phaq.phunsites.net/files/2010/12/4.png" rel="lightbox[433]"><img src="http://phaq.phunsites.net/files/2010/12/4-300x233.png" alt="" title="4" width="300" height="233" class="aligncenter size-medium wp-image-437" /></a>
</div>
<p>Zwar waren die gewünschten Dateien vorhanden &#8211; und auch im System registriert. Doch trotz ein Reinstallation und einer manuellen Neuregistrierung blieb der Fehler bestehen.</p>
<p>Zu guter Letzt und paradoxerweise genau die gegenteilige Aktion zur üblichen Verfahrensweise hat den Fehler dann zum Verschwinden gebracht, indem ich nämlich die beiden OCX-Dateien schlicht mit folgendem Befehl de-registriert habe:</p>
<p><code><br />
regsvr32 %SystemRoot%\system32\DATEINAME.ocx /u<br />
</code></p>
<div align="center">
<a href="http://phaq.phunsites.net/files/2010/12/5.png" rel="lightbox[433]"><img src="http://phaq.phunsites.net/files/2010/12/5-300x150.png" alt="" title="5" width="300" height="150" class="aligncenter size-medium wp-image-438" /></a>
</div>
<p>Fazit zum Schluss: Die OCX-Kabbelei kann man sicher _nicht_ als Fehler seitens greenCube ansehen. Dies war eindeutig irgendein lokales Phänomen, hervorgerufen durch jede Menge installierter Software. Das kann man getrost unter DLL-Hell (oder OCX-Hell) fallen lassen.</p>
<p>Dass das greenCube Installationsprogramm hingegen vom Anwender erfordert, die UAC-Funktion für die Installationa abzuschalten, sehe ich angesichts der mehrjährigen Verfügbarkeit von Windows Vista und auch dem Vista-Nachfolger als hakelig und nicht sehr benutzerfreundlich.</p>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2010/12/21/dll-hell-oder-als-greencube-mit-comdlg32-ocx-nicht-zusammenspielte/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Binding SSL in IIS causes &quot;A specified logon session does not exist. It may already have been terminated&quot; error</title>
		<link>http://phaq.phunsites.net/2010/12/09/binding-ssl-in-iss-causes-a-specified-logon-session-does-not-exist-it-may-already-have-been-terminated-error/</link>
		<comments>http://phaq.phunsites.net/2010/12/09/binding-ssl-in-iss-causes-a-specified-logon-session-does-not-exist-it-may-already-have-been-terminated-error/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 00:49:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://phaq.phunsites.net/?p=198</guid>
		<description><![CDATA[There&#8217;s maybe a zillion computer issues out there which are so damn weird that most people scratch their head in misbelief. One of these weirdnesses just crossed my way a few days ago. It all started with a very simple task: One of my engineers had to renew an SSL certificate for an IIS-hosted website. [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s maybe a zillion computer issues out there which are so damn weird that most people scratch their head in misbelief.<br />
One of these weirdnesses just crossed my way a few days ago.</p>
<p>It all started with a very simple task: One of my engineers had to renew an SSL certificate for an IIS-hosted website.<br />
After receiving the renewed SSL certificate and importing it into the certificate store, he tried to bind the SSL port on the IIS website with the new certificate.</p>
<p>What a bummer when he discovered, that this would always result in the following error, no matter what and how often he tried:<br />
<span id="more-198"></span><br />
<img src="http://phaq.phunsites.net/files/2010/12/screen11.png" alt="screen1" width="543" height="333" class="aligncenter size-full wp-image-200" /></p>
<p>All investigation about this issue were dead ends.<br />
Sure, there is a lot of information about this issue available on the net.</p>
<ul>
<li><a href="http://forums.iis.net/t/1149042.aspx" target="_blank">some suggest exporting and reimporting the certificate</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/aa529292.aspx" target="_blank">An msdn article suggests, that the certificate does not support digital signature use</a> (hmmm &#8230; well &#8230; an officially signed certificate intended for HTTPS use!?!? especially one, where Certificate Manager SAID that is was intended for that particular purpose!?)</li>
<li><a href="http://blog.freakcode.com/2009/02/iis7-certificate-binding-issue.html" target="_blank">Another one cares about the private key settings while importing the key/cert pair</a></li>
</ul>
<p>To make this short: A lot of posts, a lot of people having the same issue, a lot of suggestions, neither of which worked for us <img src='http://phaq.phunsites.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>There&#8217;s even the <a href="http://support.microsoft.com/kb/981506/en-us" target="_blank">official KB981506</a> at Microsoft which tries to fix this for IIS 7 through a hotfix.</p>
<p>As with other possible solutions out there, there&#8217;s people for whom this worked, while it didn&#8217;t for others. Neither did it for us.</p>
<p>To make this even more worse: Using the very same private key/certificate pair on another server worked perfectly!</p>
<p>So, with all that information I thought about the export/import way being well worth another try &#8211; using a slight variation.<br />
This takes also into account that the MSDN article mentioned above states the possibility of a wrong &#8220;key usage&#8221; token.</p>
<p>Therefore I made sure that I got a proper export from Certificate Manager into PKCS#12 (.pfx or .p12 extensions) including both the private key and the certificate for both the renewed and the previous period.<br />
Afterwards I copied the files over to a UNIX machine and converted them from PKCS#12 file into PEM format using this openssl command:</p>
<p><code><br />
openssl pkcs12 -in previous_cert_key.pfx -out previous_cert_key.pem -nodes<br />
openssl pkcs12 -in renewed_cert_key.pfx -out renewed_cert_key.pem -nodes<br />
</code></p>
<p>Then I took a look at them X.509 headers of the PEM files. They looked as follows for the previous key/cert pair:</p>
<p><code><br />
Bag Attributes<br />
    Microsoft Local Key set:<br />
    localKeyID: 01 00 00 00<br />
    friendlyName: {29F1929F-FC74-412B-ACF1-45BEEC51631A}<br />
    Microsoft CSP Name: Microsoft RSA SChannel Cryptographic Provider<br />
Key Attributes<br />
    X509v3 Key Usage: 10<br />
</code></p>
<p>And this is what it looked like for the renewed key/cert pair:</p>
<p><code><br />
Bag Attributes<br />
    Microsoft Local Key set:<br />
    localKeyID: 01 00 00 00<br />
    friendlyName: le-220133ff-668b-4e6a-946e-2c6581baeb86<br />
    Microsoft CSP Name: Microsoft Enhanced Cryptographic Provider v1.0<br />
Key Attributes<br />
    X509v3 Key Usage: 80<br />
</code></p>
<p>Besides some rather to be ignored differences, the most notable and even as important one are the &#8220;X509v3 Key Usage&#8221; tokens, as they differ for the both key/cert pairs.</p>
<p>While the key usage 10 (should read 0&#215;10) denotes an encipherment-elligible certificate, a key usage of 80 for the renewed certificate denotes it as valid for signing purposes only.</p>
<p>This however makes not much sense, as it should be encipherment-elligible, otherwise our TLS/SSL won&#8217;t work at all.</p>
<p>Maybe this is the root cause of the certificate, which could not be properly used for TLS/SSL port binding on IIS?</p>
<p>Let&#8217;s have a deeper look at the X.509 extended attributes, which can be reviewed like this:</p>
<p><code><br />
openssl x509 -in previous_cert_key.pem -inform PEM -text<br />
openssl x509 -in renewed_cert_key.pem -inform PEM -text<br />
</code></p>
<p>The extended key usage attributes read identically for both key/cert pairs:</p>
<p><code><br />
            X509v3 Key Usage: critical<br />
                Digital Signature, Key Encipherment<br />
            X509v3 Extended Key Usage:<br />
                TLS Web Server Authentication, TLS Web Client Authentication<br />
</code></p>
<p>So we obviously had a mismatch between the X.509 default and the respective extended attributes.</p>
<p>I got the feeling, that the MSDN article was indeed right about the &#8220;mismatch&#8221; reason. Especially if digging around the <a href="http://tools.ietf.org/html/rfc5280" target="_blank">X.509 RFC</a>, which stated some special considerations about when and how particular usage key tokens apply.</p>
<p>Basically to say is that conflicting values between the default and the extended key usage attributes may render a certificate useless in some cases, as they the flags are ignored in some cases.</p>
<p>So in this case I suppose that due to a somehow wrong default key usage attribute the certificate was still valid, but it was not elligible for envipherment use as the attributes mismatched each other.</p>
<p>To prove my assumption I then converted the PEM file of the renewed certificate back into a PKCS#12 file using this command, as already stated in a <a href="http://phaq.phunsites.net/2007/01/03/convert-openssl-key-pair-to-pkcs-12-format/">previous post</a>:</p>
<p><code><br />
openssl pkcs12 -export -in renewed_cert_key.pem -inkey renewed_cert_key.pem -out reconverted_cert_key.pfx<br />
</code></p>
<p>Obviously this caused the default key usage attribute to be fixed up in some way.<br />
After importing the reconverted PKCS#12 file into Cert Manager, rebinding port 443 with the new certificate worked properly and SSL was usable from that point on.</p>
<p>To conclude from my experience: The root cause for this was a most-likely malformed default key usage attribute, which didn&#8217;t match up to the extended key usage attributes.<br />
As to my understanding, it may or may not be a software bug in IIS 7 on Windows Server 2008, which messed up binding the certificate to the port because it couldn&#8217;t handle this situation properly. It is however unknown, why the hotfix didn&#8217;t work and it must be assumed, that my case does not really apply to the KB issue.<br />
As seen from the import on a Windows Server 2008 R2 host with IIS 7.5, the renewed certificate DID work properly there, even without tampering around with openssl conversion in the first. This might be due to a proper implementation which demands that the extended attributes are preferred over the default attributes.<br />
Additionally, the successful export+openssl-conversion+reimport seems to support this assumption, as it did work afterwards on the Windows 2008 / IIS 7 host.<br />
Here we must also consider that openssl did remove the default key usage attribute upon reconversion to PKCS#12 format.</p>
<p>After all, here&#8217;s yet another possible way to work around this issue. This worked for me. Your mileage may vary, and most likely will <img src='http://phaq.phunsites.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2010/12/09/binding-ssl-in-iss-causes-a-specified-logon-session-does-not-exist-it-may-already-have-been-terminated-error/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Killing a Windows Terminal Session from remote</title>
		<link>http://phaq.phunsites.net/2008/01/25/killing-a-windows-terminal-session-from-remote/</link>
		<comments>http://phaq.phunsites.net/2008/01/25/killing-a-windows-terminal-session-from-remote/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 12:27:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://phaq.phunsites.net/2008/01/25/killing-a-windows-terminal-session-from-remote/</guid>
		<description><![CDATA[Darn it! Imagine what happens when a Windows box, which is configured for remote administrative terminal mode only, is left with two zombie terminal sessions. Maybe you are lucky, and Terminal Services Manager does the job for you. In theory, one might connect another host for management purposes. In case your administrative credentials are different [...]]]></description>
			<content:encoded><![CDATA[<p>Darn it!<br />
Imagine what happens when a Windows box, which is configured for remote administrative terminal mode only, is left with two zombie terminal sessions.<br />
<span id="more-113"></span><br />
Maybe you are lucky, and Terminal Services Manager does the job for you. In theory, one might connect another host for management purposes.<br />
In case your administrative credentials are different from the ones on the destination host, Terminal Services Manager might throw an insufficient permissions error at you.</p>
<p>So it was in my case, which I worked around like this:</p>
<p>First I opened up a command shell (Start &#8211; Run &#8211; cmd + OK), from which I ran this command:</p>
<pre>
C:\\Documents and Settings\\Administrator&gt;net use o: \\\\192.168.13.205\\c$ /user:Administrator

The password or user name is invalid for \\\\192.168.13.205c$.

Enter the password for 'Administrator' to connect to '192.168.13.205':

The command completed successfully.</pre>
<p>This asked me for the credential of the remote system&#8217;s Administrator<br />
and connected it&#8217;s shared C: drive to my system.<br />
In fact, connecting the share isn&#8217;t required, everything else works too, as long as you&#8217;re prompted to enter the credentials for the remote systems.<br />
In my experience, connecting a share proved to work out properly in most cases.</p>
<p>So afterwards, I ran this command to list the remote server&#8217;s terminal sessions:</p>
<pre>
C:\\Documents and Settings\\Administrator&gt;qwinsta /server:192.168.13.205
 SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
 console                                     0  Conn    wdcon
 rdp-tcp                                 65536  Listen  rdpwd
 rdp-tcp#10        Administrator             2  Active  rdpwd
 rdp-tcp#16        Administrator             3  Active  rdpwd</pre>
<p>So, to kill any or all of these sessions, run this command:</p>
<pre>
C:\\Documents and Settings\\Administrator&gt;rwinsta rdp-tcp#10 /server:192.168.13.205</pre>
<p>It&#8217;s also possible to kill a session by it&#8217;s ID, which works like this:</p>
<pre>
C:\\Documents and Settings\\Administrator&gt;rwinsta 3 /server:192.168.13.205</pre>
<p>Let&#8217;s check out if our zombie sessions are gone now:</p>
<pre>
C:\\Documents and Settings\\Administrator&gt;qwinsta /server:192.168.13.205
 SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
 console                                     0  Conn    wdcon
 rdp-tcp                                 65536  Listen  rdpwd</pre>
<p>So it looks good after all, the sessions are gone and I can reconnect the server using rdpclient as usual.</p>
<p>So let&#8217;s disconnect the share now, as in fact it wasn&#8217;t used for anything except to store the credential.</p>
<pre>
C:\\Documents and Settings\\Administrator&gt;net use o: /delete
o: was deleted successfully.</pre>
<p>By the way, if you don&#8217;t want to encounter these hassles over and over again, terminal server can be configured to automatically terminatate stale/inactive sessions.<br />
Find more about this in the <a href="http://support.microsoft.com/kb/216783" target="_blank">Microsoft Knowledge Base</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2008/01/25/killing-a-windows-terminal-session-from-remote/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No &quot;sleep&quot; command for batch files? Make it a choice!</title>
		<link>http://phaq.phunsites.net/2007/05/05/no-sleep-command-for-batch-files-make-it-a-choice/</link>
		<comments>http://phaq.phunsites.net/2007/05/05/no-sleep-command-for-batch-files-make-it-a-choice/#comments</comments>
		<pubDate>Sat, 05 May 2007 18:35:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DOS]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://phaq.phunsites.net/2007/05/05/no-sleep-command-for-batch-files-make-it-a-choice/</guid>
		<description><![CDATA[I just trapped myself while hacking up a batch file. Used to shell scripting I wanted to add a delay to the batch using &#8220;sleep&#8221;. Dough! Bad Idea! Bad command or filename. Smash your head here to continue {(x)}! So I winded up my memories from stoneage. Wasn&#8217;t there the choice command!? Yeah, after some [...]]]></description>
			<content:encoded><![CDATA[<p>I just trapped myself while hacking up a batch file.<br />
Used to shell scripting I wanted to add a delay to the batch using &#8220;sleep&#8221;.</p>
<p>Dough! Bad Idea! Bad command or filename. Smash your head here to continue {(x)}!<br />
<span id="more-92"></span><br />
So I winded up my memories from stoneage. Wasn&#8217;t there the choice command!?</p>
<p>Yeah, after some lurking around with the &#8216;/?&#8217; feature I had stuck it together:</p>
<pre>choice /c 1 /d 1 /t 1 &gt; nul</pre>
<p>While</p>
<ul>
<li>&#8220;/c 1&#8243; sets the choice values (1 is my value)</li>
<li>&#8220;/d 1&#8243; sets the default choice value (which is 1 from above)</li>
<li>&#8220;/t 1&#8243; sets the timeout to 1 second (or whatever is appropriate)</li>
<li>&#8220;&gt; nul&#8221; means the same as &#8220;&gt;/dev/null&#8221;: send output to nirvana (notice there being only one &#8216;l&#8217; however)</li>
</ul>
<p>Of course this may be bothersome to type if you use it often, so a &#8220;batch function&#8221; may be better, especially when you need other batch tricks to get around DOS command limitations (lazy man&#8217;s approach: create a second batch file for it).</p>
<pre>
@echo off

rem *******************
rem check args
rem *******************

:checkargs

if "%1/" == "func/" goto callfunc
goto main

:_checkargs

rem *******************
rem call functions
rem *******************

:callfunc
 shift

 rem we could do "goto %1" instead
 rem if there is a lot of functions
 if "%1/" == "sleep/" goto sleep

 goto exit

:_callfunc

rem *******************
rem function sleep
rem *******************

:sleep
 shift

 choice /c 1 /d 1 /t %1 &gt; nul

 goto exit

:_sleep

rem *******************
rem main body
rem *******************

:main
 echo hello, going to sleep now
 call %0 func sleep 1

 echo sleep is over, good bye

 goto exit

:_main

rem *******************
rem exit handler
rem *******************

:exit
 rem if there is anything left to do, do it now.

:_exit</pre>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2007/05/05/no-sleep-command-for-batch-files-make-it-a-choice/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>&quot;Error 1913&quot; while installing Office 2003 on Vista</title>
		<link>http://phaq.phunsites.net/2007/04/01/error-1913-while-installing-office-2003-on-vista/</link>
		<comments>http://phaq.phunsites.net/2007/04/01/error-1913-while-installing-office-2003-on-vista/#comments</comments>
		<pubDate>Sun, 01 Apr 2007 14:03:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://phaq.phunsites.net/2007/04/01/error-1913-while-installing-office-2003-on-vista/</guid>
		<description><![CDATA[I would have supposed that installing Office 2003 on Windows Vista would simply work.My assumption was so terribly wrong. Not soon after starting Setup it throws this error message at me: Error 1913: Setup cannot update file C:\\WIndows\\system32\\mapisvc.inf. Verify that the file exists in your system and that you have sufficient permissions to update it. [...]]]></description>
			<content:encoded><![CDATA[<p>I would have supposed that installing Office 2003 on Windows Vista would simply work.<br />My assumption was so terribly wrong. Not soon after starting Setup it throws this error message at me:</p>
<pre>
Error 1913: Setup cannot update file
C:\\WIndows\\system32\\mapisvc.inf.
Verify that the file exists in your system and that you have
sufficient permissions to update it.</pre>
<p><span id="more-91"></span></p>
<p>So, oviously an issue with Outlook (mapisvc) registering itself in the system.<br />
Running Setup without installing Outlook was just fine. So was when installing Outlook without MAPI (the &#8220;Exchange&#8221; stuff&#8230;) features.<br />
I hoped it to be simply a file permission issue causing setup to fail on updating mapisvc.inf. Looking at the file permissions showed me this:</p>
<pre>
C:\\Windows\\System32&gt;cacls mapisvc.inf
C:\\Windows\\System32\\mapisvc.inf NT SERVICE\\TrustedInstaller:(ID)F
                                PREDEFINED\\Administrators:(ID)R
                                NT-AUTHORITY\\SYSTEM:(ID)R
                                PREDEFINED\\USERS:(ID)R
</pre>
<p>So, my permissions are inadequate? Setup does not account to TrustedInstaller Group?<br />
Fact is: I could not edit the permissions in the first place. It was likely to be some sort of UAC (User Account Control) magic trickery.</p>
<p>So I decided to turn off UAC from control panel, not without needing to reboot the machine first of course. So be it&#8230;</p>
<p>This finally enabled me to set the file permissions on mapisvc.inf.<br />
First I re-assigned file ownership from &#8216;SYSTEM&#8217; to &#8216;Administrators&#8217;. Then I added full access permissions for &#8216;Administrators&#8217;.</p>
<p>After going through all these hassles, Setup did finally not complain any more and installed Outlook 2003 with MAPI features successfully.</p>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2007/04/01/error-1913-while-installing-office-2003-on-vista/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>Interoperability Problems: Samba, Windows, Rsync and Unicode</title>
		<link>http://phaq.phunsites.net/2006/10/28/interoperability-problems-samba-windows-rsync-and-unicode/</link>
		<comments>http://phaq.phunsites.net/2006/10/28/interoperability-problems-samba-windows-rsync-and-unicode/#comments</comments>
		<pubDate>Sat, 28 Oct 2006 00:19:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.phunsites.net/wp/2006/10/28/interoperability-problems-samba-windows-rsync-and-unicode/</guid>
		<description><![CDATA[A late night experience, thank good I got it fixed right away&#8230; Imagine this setup: A Samba file server (primary) and a Windows file server (secondary). A DFS root which points to the Samba server (as primary) and the Windows server (as secondary, which maintains a replica of the primary). An rsync client (cwrsync) is [...]]]></description>
			<content:encoded><![CDATA[<p>A late night experience, thank good I got it fixed right away&#8230;<br />
<span id="more-60"></span><br />
Imagine this setup:</p>
<ul>
<li>A Samba file server (primary) and a Windows file server (secondary).</li>
<li>A DFS root which points to the Samba server (as primary) and the Windows server (as secondary, which maintains a replica of the primary).</li>
<li>An rsync client (<a target="_blank" href="http://www.itefix.no/cwrsync/">cwrsync</a>) is installed on the Windows server to maintain the DFS replica</li>
</ul>
<p>Imagine the fact:</p>
<ul>
<li>Files/directories which contain special chars (eg. umlauts) in their name copied onto the Samba server end up there correctly (eg. hÃ¼tte.doc)</li>
</ul>
<p>Imagine the problem:</p>
<ul>
<li>Files/directories which contain special chars in their named copied through rsync onto the Windows server end up there mangled (eg. hÃƒÂ¼tte.doc)</li>
</ul>
<p>The reason for this behavious is simple: cwrsync is actually nothing else than traditional rsync compiled as win32-binary using <a target="_blank" href="http://cygwin.com/">cygwin</a>. Now rsync has one major drawback: it&#8217;s not (yet) unicode aware, which means that special characters in file names are not properly converted.</p>
<p>Now there are two ways to fix this. Either replace the bundled cygwin library (cygwin1.dll) with another one which is unicode-aware. You find one at the <a target="_blank" href="http://www.okisoft.co.jp/esc/utf8-cygwin/">UTF-8 cygwin</a> project website.<br />
Another possibility would be the use of an alternative tool (anything else than rsync) which is unicode-aware or the <a target="_blank" href="http://www.kolosy.com/wordpress/?p=8">.NET based rsync port</a>.</p>
<p>I choose to go the UTF-8 cygwin way, which did the trick for me.</p>
<p>I just downloaded the 1.5.21-1 version (I checked the bundled cygwin1.dll version through properties dialog in explorer first to make sure they match), moved the original cygwin1.dll away and replaced it by the download version instead.</p>
<p>By the next time I ran cwrsync my filenames would just look as supposed. Wheew, what a night&#8230;!</p>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2006/10/28/interoperability-problems-samba-windows-rsync-and-unicode/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Another Positive Experience With Windows Server 2003</title>
		<link>http://phaq.phunsites.net/2006/10/28/another-positive-experience-with-windows-server-2003/</link>
		<comments>http://phaq.phunsites.net/2006/10/28/another-positive-experience-with-windows-server-2003/#comments</comments>
		<pubDate>Fri, 27 Oct 2006 23:30:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.phunsites.net/wp/2006/10/28/another-positive-experience-with-windows-server-2003/</guid>
		<description><![CDATA[While I&#8217;m usually living on the Unix side of live, I sometimes happen to find myself again in the Windows world. Some may say this is blasphemy, a decent unix admin would never bother in doing Windows, deny the open source idea, be such a scumbag, blablablabla&#8230; But let me tell you one thing: Windows [...]]]></description>
			<content:encoded><![CDATA[<p>While I&#8217;m usually living on the Unix side of live, I sometimes happen to find myself again in the Windows world.</p>
<p>Some may say this is blasphemy, a decent unix admin would never bother in doing Windows, deny the open source idea, be such a scumbag, blablablabla&#8230;</p>
<p>But let me tell you one thing: Windows is not that bad after all. Honestly.<br />
<span id="more-59"></span><br />
Why can I say: Because I&#8217;m writing code on Windows, I&#8217;m working with Windows (my personal workstation runs PC-BSD however&#8230;), I see and I feel when it makes progress. (Still, I&#8217;m a unix admin after all&#8230;)</p>
<p>My most recent experience was tonight. I went to setup an AD domain controller on my recently acquired Windows Server 2003 (<a href="http://www.microsoft.com/windowsserver2003/evaluation/trial" target="_blank">180-day trial license</a>).</p>
<p>I remember how long this took on my testing system (an ancient Celeron 733 with 1gig of RAM) with Windows 2000 just two weeks ago: almost 30 minutes only to initialize a new AD structure.</p>
<p>The very same process on the same machine with Windows Server 2003: not even five minutes! I could not believe this at first so I repeated this after doing a reinstall &#8211; with the same result.</p>
<p>Now this is definitely what I call progress, especially considering this kind of old hardware being used!</p>
<p>And for those who may have wondered: the whole purpose to setup the AD domain controller is to see wether an AD-driven LDAP may be merged with OpenLDAP to provide authentication services in a mixed environment. More about this shall be coming soon&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2006/10/28/another-positive-experience-with-windows-server-2003/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

