Office 2013 isn’t just sluggish and monochromatic

Office 2013 Preview isn’t just sluggish and single-colored to the point of being depressing:

I’m pretty sure this might be the most features removed from a release of Office. Have a look here – it’s downright depressing…

Changes in Office 2013 Preview

Notice the large number of features removed with no compelling reason. At least one feature (broadcasting powerpoint presentations) was removed so they could try to force you to pay for Lync.

Why Microsoft, why?

Looking for Setup Projects in Visual Studio 2012?

There aren’t any. Microsoft quietly removed all Visual Studio Installer project types from Visual Studio 2012, instead pushing the use of InstallShield Limited Edition:

http://social.msdn.microsoft.com/Forums/pl-PL/msbuild/thread/3570f0b3-53c1-4d2e-94fe-16ed7af70bbf

Windows Installer Deployment: http://msdn.microsoft.com/en-us/library/2kt85ked.aspx

Visual Studio 2012 New Features: Compatibility: http://blogs.msdn.com/b/zainnab/archive/2012/06/05/visual-studio-2012-compatibility-aka-project-round-tripping.aspx

 

There is surprisingly little information about this online. I got a chance to ask about it at TechEd 2012, and was told that WiX Toolset is the “future” of setup projects in Visual Studio, but they didn’t want to bake it in because WiX is so frequently updated.

Problem #1: None of the existing Project templates that included setup projects were updated to use either of the two options. (In fact the Shared Add-in project was removed altogether).

Problem #2: InstallShield LE is not a reasonable option (3rd party, requires registration and I hear projects expire), and WiX required learning yet another dialect.

Problem #3: A LOT of people have significant investments in Setup Projects.

 

Why did Microsoft remove them? Possibly for the same reason the word “legacy” is used when referring to desktop applications – Microsoft would love to take 30% of all your earnings through the Windows Marketplace, so they are certainly not going to help you deploy “traditional” apps if they can help it. It’s a really bad decision based on a painfully flawed strategic direction… and I doubt there is much we can do about it.

Unless somebody figures out how to put the functionality back in…

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.

slmgr.vbs /ipk AAAAA-BBBBB-CCCCC-DDDDD-EEEEE

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: http://social.microsoft.com/Forums/zh/genuinewindows7/thread/ce677eb0-7d97-46d6-81df-a05dca1c2b85

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

AT&T is having a DNS outage 8/15/2012

Noticing that you cannot access quite a few websites? Emails bouncing? Is your site traffic lower than it should be?

Is your domain’s DNS hosted with AT&T?

As of 12:21 pm EDT (we first noticed at 11:20 EDT) AT&T is experiencing a massive DNS outage.

 

This morning we started getting reports from users that inbound emails were bouncing. I soon discovered that I could not resolve our MX records externally, then that I could not even ping our website.

According to the Twitterverse AT&T is having a massive DNS outage presently. Our AT&T rep said it might be a DOS attack, and there was no estimate as to when it will be fixed.

 

UPDATE: 12:25 PM – (Glad I said something)

No sooner did I post this than our AT&T hosted DNS started responding again.

 

UPDATE 12:46 PM

Looks like it was only up long enough for my test server to get a cache – the authoritative DNS is still unresponsive.

 

UPDATE 2:20 PM

AT&T has informed some customers (including us) that the issue is resolved. Testing our site using the free Uptrends availability tool shows that it is somewhat responsive… however inbound email is still not working reliably and http://www.mxtoolbox.com says our DNS servers are still timing out.

According to a comment on this post, this outage started at 9:30 am, and it is still causing problems for us 6 hours later.

Handling Invalid Enum values in a DataContractSerializer

This all started when I was trying to serialize a CodeDom graph (actually a CodeNamespace object) using a DataContractSerializer. I hit the dreaded “Enum value ‘20482’ is invalid for type…”

image

(Note: this error was the showstopper after many other errors)

The problem: System.CodeDom.MemberAttributes should have the [Flags] attribute, but it does not. the value of 20482 is the bitwise OR of MemberAttributes.Final (2) and MemberAttributes.Private (20480). One solution was to go through all object in the CodeDom tree with attributes and force it to a single value – this is not really acceptable. Unfortunately, since we are dealing with a .NET Framework type, there is really no way to fix the type itself.

The solution: Fix the serializer… Read on for details.

Continue reading

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:

image

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

image

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

image

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.

 

HKEY_LOCAL_MACHINE\ControlSet001\services\FsDepends\Parameters\VirtualDiskExpandOnMount

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” (http://msdn.microsoft.com/en-us/library/windows/desktop/hh848072(v=vs.85).aspx)

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.

Miyota 1M12 stem removal

I was trying to remove the movement from a Hugo Boss watch with a twist setting stem. The movement is a Miyota 1M12 (helps to be near-sighted sometimes) and while other have asked, I could find no explanation for how to remove the stem.

Turns out, if you look reeeeealy close, you might get lucky and see a tiny arrow pointing to a tiny hole. You must push in this hole (with the stem fully depressed) then pull on the stem and it comes right out.

 

Visual Aides – red arrow points to the stem release hole.

image

Close-up of the hole

image

 

Make sure the crown is pressed in, then use a pin to push down in the hole, and the stem should just be loose. Don’t push too hard, and don’t hold me responsible if you break your watch!