Restore Open Command Window Here to Windows 10

Microsoft has made some rather evil changes to Windows 10 – not the least of which was disabling references to the command window / command prompt. Super nice feature they added by default was the ability to open a command window in the current folder. Then they screwed it up by replacing it with PowerShell.

PowerShell has it’s place, but it’s no replacement for cmd.exe.

So, you may have looked into the steps to fix it and felt a little dirty – you have to take ownership and fool with ACLs in the registry…

Also you may have found that it is not possible to get the command prompt back in the windows explorer ribbon file menu.

How about no and no.

Download this utility and run it – it requires admin privileges (unfortunately unavoidable). Windows SmartScreen will likely try to block the app as unrecognized – click more info and allow it to run. (If you have concerns feel free to decompile or build from source)

Binary: RestoreCommandPrompt.exe



You have 3 options. You can restore the folder shift-right click context menu, the folder background menu, and you can replace the Open Powershell here with the much more useful “Open Command Prompt”


Log out and back in and windows is at least 6 times better.

Windows 8 RT feels like Windows on ARM. Microsoft would be wise to embrace that.

I just got the chance to play with a Surface RT tablet, and I’m actually feeling much more positive about it. My understanding was that RT devices would pretty much only run Windows-Store, aka “Modern”, aka Metro apps, with cursory access to the desktop.

Turns out, Windows RT CAN run desktop apps. It has notepad, it has calculator, it has the command prompt and the administrative command prompt. Office 2013 is a desktop app on RT. It would appear that the infrastructure for windows desktop applications is alive and well on Windows RT, but Microsoft has taken steps to prevent us (us being developers) from using it.

This will inevitably change. Whether Microsoft condones it or not, people will figure out how to compile and load windows apps on ARM. (I’m REALLY hoping Microsoft provides a permitted way of doing it…, but I’ll take a jailbreak if necessary)


When Microsoft allows people to freely develop and install apps of all kinds on their Windows 8 devices (ARM or x86), Windows may just reach the holy grail of platform independence… on their flagship desktop operating system.


I’m really hoping they realize how huge this could be – sure they make a lot of money taking a 30% cut from the Microsoft Store, but restrictions and fees will only slow platform adoption. Restricted, closed platforms is the norm on tablets. An open, familiar platform… THAT would be game changing.


Keeping my fingers crossed…

Locking down a Virtual Machine with BitLocker

BitLocker is Microsoft’s volume encryption solution built into several versions of Windows since Windows Vista. (There is an excellent Open Source alternative in TrueCrypt, but it just has that 3rd party feel to it. That and this particular task is easier with TrueCrypt so you wouldn’t need my help)

Normally, BitLocker use the TPM (i.e. Trusted Platform Module – see Wikipedia) to use your physical hardware as a factor in the encryption key, and leverages the key-toting abilities of the TPM at boot time. So long as your hard drive remains inside your machine it can boot. Take it out, and it’s just a mess of encrypted junk (Although your backup key can still unlock it).

I’m guessing that if you landed here, you are keenly aware of Bitlocker and it’s uses. You may have already tried to use BitLocker on a Virtual Machine and failed. This article is for you. – read on!

Continue reading

WinRT – A gift from the past…

Just came across this enlightening blog post while asking Google if Microsoft was going to abandon .NET :

EDIT I found another developer blog with similar concerns:

I realize I’ve been complaining off and on – sometimes rather dramatically – that Microsoft is making some really terrible decisions of late. The aforementioned article helps at least give an explanation to one of those decisions:

WinRT was developed by the people who write drivers and kernels. Those people are undoubtedly C++ developers who do not consider the .NET dialects “real languages.” Which is really unfortunate, because C++ is about the worst language (short of assembly) for writing maintainable, reliable, testable, or portable code. The only upside is that if you are good at it and spend orders of magnitude more time coding, your code will be more efficient.

Windows 8 Metro apps are meant to work on both desktop and tablet PCs (even though they must be compiled separately for each platform…) Tablet PC will have seriously limited horsepower, and clock cycles equate directly to battery life. So… we go back to using C++, and impose limitations worse than PocketPC to all hardware platforms. (Bad news – C++ is only more efficient if you are good at it) (Also, HTML5/JavaScript is a really bad place to invest significant development effort when literally every new release of web browsers has resulted in breaking changes)

What should have happened is optimization of .NET for efficiency. Not pushing business application developers to become experts in memory management, pointers, references and clock cycles.


WinRT seems to be what the developers of Win32 wish they had done back in 1998, rather than a proper evolution of development technologies.


(By the way, I’ve said it before but I feel the need to mention again – Metro (aka “Windows Store” aka “Windows-8-UI”) apps can not and will never replace desktop apps. And desktop apps are not and will never be “legacy” despite some people throwing around the term. Certain parties at Microsoft would love to get a 30% cut of all developer profits, so phasing out desktop apps is certainly a bullet point in their PowerPoint, but reality will hopefully keep this at bay)

The stats now: Microsoft is alienating it’s largest user base by forcing a tablet interface onto a PC. They are alienating manufacturers by developing their own hardware and licensing portions of the OS to “chosen” companies. They are alienating mobile users and developers by essentially abandoning Windows Phone 7 and providing no upgrade path. And finally they are alienating the vast majority of developers with massive restrictions and profit cuts.

Free Syslog Server for Windows: tftpd32

I just tried to find a free syslog server for windows and it took far too long to find anything legitimately free, and / or Open Source, and / regularly updated.

Imaging my surprise to find that tftpd32 has a syslog server (that I have used before and completely forgot about…) and it is free and open source. Further imagine my disappointment that it was not the first result when searching for “free syslog server windows.” Hopefully this will help move it up in Google’s results…

You can get it here:


Despite the name, tftpd32 is available in 32 and 64 bit varieties, and includes (as you might imagine) a tftp server, dhcp, SNTP, Syslog and dns serving capabilities. And it requires no installation – just unzip and run!


By default the DHCP, TFTP and syslog servers are enabled (this is the configuration you would want if you were setting up devices like Cisco switches) – I would highly advise turning off the dhcp. Also make sure the correct interface is selected. Set your computer’s IP address as the syslog server, and watch the messages flow:


How to Activate Windows 8 Enterprise (and Enter or Change the Product Key)

Wen you install the version of Windows 8 Enterprise from MSDN (and I presume TechNet), it assumes you will have a KMS (Key Management Server) in your domain.
When you try to activate it will fail (unless you actually do have a KMS…) – I saw errors about KMS and missing DNS names.
Lastly, there appears to be no way to enter or change the product key to the one provided by MSDN.

The solution: you have to change the product key using the command line:
Open an elevated command prompt, and type the command “slmgr.vbs /ipk ” followed by your MSDN / TechNet product key.


After a few seconds you should see a popup window letting you know the product key was successfully installed.

Note: this is based on the instructions here:

In my case, this immediately removed the “Activate Windows” overlay as well as the desktop watermark with the version and build number.

Determining current laptop battery drain in .NET

My laptop battery’s lifetime has dropped significantly of late, and I wanted some means of determining the actual current being used by the system – sort of like a Power Meter for the laptop battery. I‘ve actually been looking for such a tool off and on for months. I’ve seen things you have to pay for, things that are quite old, and things you can do yourself in C++…

Well I don’t want to pay for something that tells me the power usage in mw (milliwatts). Nor do I want something with “Vista” style. Nor do I want to deal with c++.

1. Performance Monitor

Not sure why I didn’t think to look here – maybe because it’s a big mess – but it turns out the power utilization in mW is in a couple places in windows Performance Monitor:

Under Power Meter –> Power:


Do not use the _Total option – at least on my machine it is incorrect. Use all instances, then look to see which instance corresponds to your actual battery. (note: this only works while your laptop is running on battery power. “Power Meter” returns 0 when you are on AC power)


You can also use Battery Status –> Discharge Rate. There is also a Charge Rate that will have a value when the battery is charging. The only catch is that access to Battery Status requires Administrator privs.


2. .NET Performance Counter – Forms control

Forget WMI queries and System.Management – Be lazy! Visual Studio has a Server Explorer tab that allows you to easily add performance counters to your Windows Forms project.

Open Server Explorer –> You computer –> Performance Counters


Find Power Meter, expand Power, and drag whichever power meters you need onto your form. (In my case I just needed Power Meter (0).


This will add performanceCounter1 to your project. To get the current power usage in mW, just access performanceCounter1.NextValue().


3. .NET Performance Counter – Code

Even easier, once you know the Category (“Power Meter”), Counter (“Power”) and Instance (“Power Meter (0)”), you can create the performance counter in code like so:

(Add a textbox and a button to your form), use this as the button event handler

        private void button1_Click(object sender, EventArgs e)
            var powerCounter = new System.Diagnostics.PerformanceCounter("Power Meter", "Power", "Power Meter (0)", true);
            textBox1.Text = powerCounter.NextValue().ToString();


Chances are I will release a (free, open source) tool based on this, but it’s painfully simple to just get that current value. (Now to start seeing the effect of the backlight, and hard drive, and cpu load…)

The problem with Metro

I’ve been using Windows 8 as my primary OS since the Release Preview came out. I have been trying to like it. I’ve defended it to detractors. I might have even changed a couple people’s minds about it – point is I should be a best case scenario for accepting it. I even tried to like the “Metro” school of thought. Minimize the extra fluff, go “chromeless,” design first develop second, create immersive apps…

Reality is a harsh mistress.


The reader app was the first victim. Out of the box, Windows 8 has a PDF viewer that is a metro app. If you click a link to a pdf in a web page, BOOM! IMMERSIVE READER! (caps are appropriate – the Reader is jarring and obnoxious). Try as I might to like it, as soon as I actually wanted to get work done in any reasonable timeframe, I installed Adobe Reader so I could have multiple PDFs open at the same time, flip back and forth between the documentation and the application and easily work with text. Install non-metro app, productivity increases significantly.

The next casualty was the Photo Viewer. Believe it or not, I don’t always want to see a full-screen immersive viewer when I open a photo. If I am trying to quickly find the right screenshot in a folder containing a bunch of screenshots, the last thing I need is a big full screen viewer to cover my workspace… File association changed, problem solved.

How about the start screen – just a different way of looking at the Start Menu, right? Perhaps, if I could still shift-right-click to run as a different user (you don’t run your desktop OS with a domain admin account, right?); or if I could open multiple instances of an application (if you attempt to run notepad when notepad is already running, it just activates the existing window); or if I had a list of the most recent apps, or if I had jump lists, or if I could pin frequently used documents. The Start Screen is a poor replacement for the Start Menu. I ended up using Run more often than the start screen. Hello Windows XP… goodbye efficiency.

So I finally figured out how to fix all the productivity issues: switch back to Windows 7.

What it all boils down to is a matter of efficiency. For the “typical”, casual user Windows 8 should be great. For a Mac user, Windows 8 should be great. For your grandparents, Windows 8 should be great. For a tablet and a phone, Windows 8 should be great.

For a power user on a desktop PC, pretty much all Metro components of Windows 8 will slow you down even after you get used to them.

That is the problem with Metro

Registry Setting to Prevent windows from expanding native booted vhd

Windows 7, 8 (and server 2008r2) allow you to boot them natively from a vhd. The steps to set this up are readily available on your favorite search engine. Where your search engine might fail you is if that VHD happens to be dynamically expanding, and you do NOT want it expanded to full size.


Here is the registry setting you are looking for – this will prevent windows from expanding the vhd:

You can load the registry hive in another instance of windows, or even from the windows install CD.



You might as well change it in all the ControlSets


Change the value from 1 to 4.

Windows 8 loses Previous Version; Microsoft forgets about business users again

Microsoft decided to remove the “Restore Previous Versions” functionality from Windows 8 because “Previous Versions were rarely used and negatively impacted the overall Windows performance” (

Note the bolded “were rarely used” – this is Microsoft’s true justification for feature removal, and it is highly flawed for two (and a half) main reasons:

  1. File recovery technologies are supposed to be rarely used. Think about it.
    (The feature as implemented was not exactly intuitive for non-technical users.)
  2. It may not be true – Microsoft made assumptions about all Windows users from the subset of users who participate in the Customer Experience Improvement Program


How often should you have to restore?

People rarely need to restore files from backup – this is the nature of the industry. If people are using recovery technologies frequently, either the users are doing something wrong or the software is faulty. Nonetheless, mistakes happen. A file gets accidentally deleted, or saved with catastrophic changes. Or overwritten, infected or corrupted…

Disasters – logical or otherwise – are rare. Most people running Windows don’t bother to configure a recovery solution before disaster strikes. Previous Versions was almost like an “Undo” for file operations that was there, out of the box. It was a very low impact way of providing logical file recovery – as opposed to traditional backups that require massive resources (I/O, compression CPU, time, planning, external storage….). If you didn’t do backups, you at least had something.

Additionally, using the feature required an understanding of folder hierarchy that many users lack. That is, if you accidentally deleted a file in C:\Users\bob\My Documents, you had to browse to C:\Users\bob, right-click on My Documents and select Restore Previous Versions. The trouble is, My Documents is part of a Library in Windows 7, and you cannot browse to the parent folder of a library. Since (again arguably) must accidentally messed up files are in the Documents folder, many if not most users weren’t able to get to the right place to restore their documents.

So the workflow / interface was not useable by the average users. Fix the interface, don’t remove the feature.


CEIP and rash generalizations

Microsoft lately has been using telemetry data from the Customer Experience Improvement Program (CEIP) to decide which features are used, and which are not. This data is truly invaluable in giving them insight on the usability of their products in the real world, (and I don’t mean to downplay the value of this data) but it must be used responsibly from a statistical perspective.

If everybody always participated in the CEIP then the data from it would be complete and truly representative of all users. This is not the case, however. Many businesses, as well as privacy-minded individuals choose to disable or block the phone-home functionality of Microsoft’s products. This includes the CEIP, as well as Error Reporting and even Product Activation.

I wouldn’t event try to guess at the actual statistics, but I am confident that Previous Versions were used more frequently by people on workstations with CEIP disabled – Power users, IT professionals and corporate users. And I bet that is a lot.

We’ve seen this before – Remember the ribbon in Office 2007? I read an article where Microsoft proudly stated that according to their telemetry data, very few people customized the toolbars in Office 2003, so they made the ribbon non-customizable to make life easier for “most users”. Guess what happened? Enough people hated it that they had to fix it in the next version – you can customize the ribbon in Office 2010.

The telemetry was wrong.


But even if it was right, Microsoft needs to keep something in mind: There are a LOT more standard users than there are IT professionals, but IT professionals are the driving force behind their business.