Microsoft Windows and all that goes with it

Ctrl+Alt+Left

There is always period between installing your favorite OS into virtual machine and installing integration component when mouse cannot be shared between host and virtual machine. Once you click on virtual machine, all your mouse moves are interpreted as virtual mouse moves.

To regain control you need to press some magic key-combo. On newest Virtual PC (beta) that combination is Ctrl+Alt+Left. This is quite a different than what Virtual PC/Server used before (Ctrl+AltGr) but Hyper-V users will find them self at home since same combination is used there.

Other useful combination to remember is Ctrl+Alt+End which simulates good old Ctrl+Alt+Del. In order to switch between normal and full screen, use Ctrl+Alt+Pause.

I will also mention few mappings that will probably cause quite a trouble with old games:

Alt+Home => Ctrl+Esc
Alt+Insert => Alt+Esc
Alt+PgUp => Alt+Tab
Alt+PgDn => Alt+Shift+Tab

I found no way to turn them off.

IIS

Illustration

If you deploy web application or service and you get “Could not load file or assembly ‘SomeAssembly’ or one of its dependencies. An attempt was made to load a program with an incorrect format.”, chances are that you are running of 64-bit Windows.

Underlying problem is BadImageFormatException (you can check it in stack trace) but no matter how far down stack trace you take a look, you will not be able to link it to your code. Reason for that is that your application hasn’t started running yet.

IIS

By default IIS’ processes are 64 bits (on 64-bit system). Your code is in 32-bit world. Mix those two and you won’t get far. To fix it simple recompile of application in 64-bits or as “Any CPU” will do.

However, sometimes recompile is out of question. Maybe you have some 32-bit dependencies or you don’t have access to source code to recompile it. Whatever reason is, only solution is to force IIS into 32-bit mode.

Solution

That is simply done:

C:\inetpub\AdminScripts\adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 True

Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Enable32BitAppOnWin64           : (BOOLEAN) True

This will cause all IIS processes to work in 32-bit mode and that solves our problem. Not even restart is not required.

P.S. Notice that you do need to install “IIS Management Script and Tools” for that script to be available.

Shake It Babe

There is one feature in Windows 7 that I though was useless. Basically, you take title-bar of any window and move mouse (shake it) while holding left mouse button. That action causes all windows to disappear thus leaving your window as single occupant of desktop space.

Today I wanted to copy one file to desktop. I had mouse in my hand but also a lot of windows in path between explorer and desktop. There was no easy way to see desktop except minimizing all windows except one with my file. Than I understood.

This shake it motion is for people so lazy that one additional minimize all would be troublesome. That said, I did like it. :)

Windows 7 and the Power of XP

Illustration

One of optional components of Windows 7 is Windows XP Mode. Idea sounds great: “Let’s make one virtual machine with Windows XP and run all legacy software on it.”. This approach gives you great flexibility in upgrading your software since anything compatible with XP becomes compatible with Windows 7.

In order to use it, additionally to having Windows 7 release candidate, you need to download both beta of Virtual PC 2007 and beta of Windows XP mode.

How does it look

Illustration

Interface is really minimalistic. I do miss hard disk activity icon in status bar, but if you consider that plenty of people who have no idea what virtualization is will use it, that may not be bad idea. All other options seem to be in place (not that Virtual PC had much of options anyhow).

New Virtual PC

Since this feature is based on new Virtual PC, this is great chance to see how things will look with new version.

First thing that I noticed is USB menu. Believe it or not, it seems that Microsoft finally decided to add some support for USB devices. I tested it with USB drive and it worked (after automatic installation of small stub driver), but I cannot vouch for more complicated devices. For some devices (in my case VGA camera) it shows unidentified device, but attaching it does work properly so I will give it benefit of doubt and assume that this is something inherit to beta or my laptop.

Everything else seems to be same like in Virtual PC 2007 but with less flexibility (no separate virtual disk wizard, no device activity icons…). Hopefully advanced interface (like one in old Virtual PC) will be available after this beta.

Auto publishing

Illustration

When I saw picture of Windows XP mode in action for the first time, I liked feature that they called auto publishing (to me it looks same as VirtualBox’s seamless mode).

In theory it seemed simple, you just install some legacy application in Windows XP (for me it was Google’s Chrome - it still doesn’t work on Windows 7 - shame on you Google) and auto publishing should add shortcut to that application in Windows 7 menu. Once you start your application via that shortcut, you get desktop integration and all that stuff.

Problem with that simple scenario is that it does not work. In moment of pure desperation, I even tried looking it up in help. That action wasn’t helpful since documentation is still not done and all I got was equivalent of “This page was intentionally left blank”. By pure accident, I stumbled upon Virtual PC forum. Only there I saw how that should be done. You need to manually create “Programs on the XP VM” folder under “C:\Documents and Settings\All Users\Start Menu”. Once shortcut gets placed there, it also gets copied to Windows 7 menu.

Illustration

Another thing that can cause some problems is fact that you cannot both see desktop and applications at same time. Although this is not a big problem in normal circumstances, it causes minor inconvenience when you need to go in Control Panel (or some other non-published application) since you need to save your work first. Same thing will also happen if you go from full desktop to application mode.

There are minor issues with Windows 7 specific features and application virtualization. One that I mind most is missing thumbnail preview on taskbar button. If you have few applications open (e.g. few instances of Visual Basic 6.0), it is impossible to tell them apart without actually switching.

Other minor issues

For this to have any chance of working, you need hardware support for virtualization. I do not quite get why this is prerequisite. Everything that you could do with hardware supported virtualization, you could do without it also (with some speed loss). [2010-03-19: Hardware supported virtualization is not needed any more.]

Speaking of speed, starting time for this is not so good. It takes a while for this virtual machine to boot. While I do understand reason behind slow start, I am not so sure that someone using it on daily basis would be happy with that explanation.

I also doubt decision to make hibernate a default for close action. Hibernate may seem like a decent option at first, but probability is that some imaginary “default” user will probably always perform close (and implicitly hibernate it every time). I am not that sure that application that hasn’t fix it’s compatibility bugs for last seven years will take hibernate kindly. Expecting inexperienced user to find shut-down option behind Ctrl+Alt+Del and know when to do it is little too much of optimism for my taste.

Is it any good?

For those clients stuck with some legacy application, I would say yes. You get great new interface and features, along compatibility with your Clipper-like weight. For programmers - definitely - you get one free XP system to test your programs on.

All others can safely ignore it.

IE8 and Spelcheker

I do like new Internet Explorer features, but I do miss Firefox style spell checker. There is free (for non-commercial purposes) ieSpell add-on, but I do not like it’s modal dialog interface.

Is there any IE8 spell checker that is capable of red-underlining unknown words?

P.S. Title pun in intended. :)

Windows 7 RC

Release candidate is finally out for MSDN subscribers.

Thanks for subscription Marc. :)

XPM

Illustration

There is new feature in sight for Windows 7. It is called Windows XP Mode and it will allow you to run Windows XP applications in virtualized environment.

Nice thing about this will be that XP windows will just open without showing the whole XP desktop. This is quite significant since whenever virtualization is employed, some reeducation needs to be done. Now education will consist of simple: “Just click shortcut and window will appear.” line. For “standard” consumer, everything should look the same (ok, title bar is giveaway).

P.S. If this feature seems like something you saw somewhere, there is more-or-less same feature in VirtualBox. It is called seamless mode there.

Finding Differences

Illustration

I often have need to compare two files. Usually, I just use PSPad compare, but that tool can be quirky at best.

I tried lot of stand-alone freeware programs for that purpose, but SourceGear’s DiffMerge was one I selected. It just works (and it works fast). Along standard features for such programs, there are two features that made it special to me.

First one that I liked a lot is capability to show changes within line. It will show you exactly which characters were changed. You can quickly see what was really changed and what was just small correction. Another one is integration inside Windows Explorer. While most programs do this, this one does it properly even on 64-bit systems. That was problem for all others I tried.

If you are looking for file compare program, try this one. There are lot of features inside that I didn’t mention and program is really easy to use.

Last 32-Bit Windows

When Vista was announced, it was said that it will be last 32-bit operating system from Microsoft. With Windows 7, they changed their mind since Windows 7 will come in both 32-bit and 64-bit flavors.

Server platform took different approach and Windows Server 2008 R2 will come only in 64-bit variant. There will be support for 32-bit applications (WOW64) but underlying system and hardware will work only in 64-bit space.

Once server goes that path, client platform will follow. Windows 7 may be known as last 32-bit Windows.

Service Triggers

In order to speed up booting and avoid unnecessary hog on resources, Windows 7 gave us possibility of running services only when some preconditions are being met. Currently those preconditions include change of IP address, joining a domain, firewall changes, USB device insertion and few others.

This is great for services that need to perform some action when that precondition is met and spend most of time waiting (e.g. update some settings on IP change).

Currently there is no graphical interface to view/change settings so everything needs to be set through application’s code (or command-line). Since service (and it’s installer) are in best position to know when activation is needed, I do not find this a big limitation. Those programming in .NET will need some P/Interop in order to use it.

You can check this video for more details.