Category Archives: windows

Windows Phone 8 will run Windows 8, with Silverlight centre stage?

More information on Windows 8 is leaking out now; and it gives some clues about how Microsoft intends to make sense of its two device platforms, Windows tablets and Windows Phone.

Microsoft held back from making its Windows Phone 7 OS available on tablets, which is why most of the numerous tablets being pushed out to compete with Apple run Google Android, and a few of them Windows 7 with its excessive power requirements and a user interface poorly designed for touch control.

Now the strong rumour is that Windows 8 supports two user interfaces, one that is tile-based like Windows Phone 7, and another that is designed for PCs.

In other words, rather than continuing with the Windows Phone 7 OS which is built on Windows CE, Microsoft will build a new version of the Windows Phone 7 UI on top of full Windows.

My further assumption is that Silverlight apps will still run on the new OS, providing continuity with Windows Phone 7 which uses Silverlight or XNA, both based on .NET, for its application platform.

Silverlight might also be used as the platform for apps delivered by the new Windows app store. This is Paul Thurrott, though reported as rumour:

Windows 8 will also include a new app model codenamed Jupiter that will target a new Windows Marketplace app store. The app store will provide access to new, Silverlight based "immersive" applications that are deployed as AppX packages (.appx). The Windows and Office teams are betting very heavily on this new app type, according to my source, and development has already begun using a beta version of Visual Studio 2012. These apps can be written in C#, Visual Basic, and even C++.

We do know that Silverlight 5 supports full platform invoke of native code, a feature which tends to support the idea that it is becoming a key runtime for Windows.

Let me speculate a little further. Imagine you are Adobe, for example, which has said it will deliver the Flash runtime for Windows Phone. Although it competes with Silverlight to some extent, Microsoft needs to tick the Flash box for Windows Phone. But why would Adobe want to invest in Flash for Windows CE, when this OS is not going to be used for Windows Phone 8 and it will have to write new code? I will not be surprised if we hear that Flash is now not coming until Windows Phone 8.

Even within Microsoft itself, I would guess that investment is focused on the next generation rather than the one that is destined to be short-lived.

One partner that is no doubt close to Microsoft’s plans is Nokia. If the above is correct, then Nokia is buying into the Windows OS, not the Windows Phone OS. Will Nokia wait for Windows Phone 8 before launching devices on the platform? I have no idea – and delay will be costly – but I imagine its main plans will be focused on Windows Phone 8 and the possibility of tablet as well as smartphone devices.

The immediate conclusions would be:

  • Silverlight is safe as a development platform, but only for Windows. See also Silverlight the new Windows runtime, HTML 5 the new Silverlight?
  • The Windows Phone 7 OS will be short-lived but the new UI should be a natural progression from what we have now, and apps should still run, so Microsoft can position Windows Phone 8 to users as a new version of Windows Phone rather than a change of direction.
  • Microsoft will not have a coherent mobile and tablet platform until Windows 8 ships sometime in 2012. Google, Apple, RIM, HP, all have plenty of time to establish their competing platforms.

How an RTF file can install a virus when opened

There is an analysis by Rob Rachwald over on the Imperva Data Security Blog of how an RTF document can carry a virus, in this case a trojan executable. RTF (RIch Text Format) is generally considered safer than the Microsoft Office .DOC format since it cannot include macros; but the vulnerability in this case is in the software that parses the RTF when it is opened in Microsoft Office on Windows or Mac – though in this case the actual payload is Windows-only so would not normally affect Mac users.

Unfortunately this code may run when previewing a document in Outlook, which normally embeds Word, so it is potentially rather damaging.

Rachwald traces how the embedded trojan evades anti-virus, installs itself into the Windows system32 folder, and creates a remote shell application.

It does appear that the vulnerability was patched in November 2010. Still, it is interesting that the insecure code survived in Microsoft Office at least back to Office XP Server Pack 3 in 2004 and probably earlier.

I mention it partly because the analysis is a good read, and partly to highlight the fact that even RTF documents may not be safe.

Microsoft backs Telefonica’s BlueVia mobile SDK – but the market is fragmented

Announced at Mobile World Congress last month, BlueVia is Telefonica’s effort to attract developers to its app platform. Telefonica is the largest phone operator in Spain and also owns O2 in the UK, and has various other operations around the world.

In this case though, “Platform” is not just the devices connected to Telefonica networks, but also services exposed to apps via newly published APIs. BlueVia has APIs for sending and receiving SMS messages, delivering mobile ads, and obtaining information about the current user through a User Context API.

Things like sending a text from an app are nothing new, but a difference is that BlueVia will pay the developer a cut from the revenue generated. Along with ads, the idea is that an app can generate a revenue stream, rather than being just a one-off purchase.

The news today is that Microsoft is backing BlueVia with a toolset and marketing to Windows platform developers. There has been an SDK for Microsoft .NET for some time, but today Microsoft and BlueVia have delivered a new SDK for .NET which includes both server and client side support for the BlueVia APIs. On the server, there are templates for Windows Azure and for BlueVia ASP.NET MVC2 and WCF (Windows Communication Foundation) applications. On the client side, there are Silverlight controls such as a DialPad, an Advertising control, and a text to speech control. Microsoft also provides hooks to Windows Live Services in the hope that you will integrate these with your BlueVia applications.

The snag with developing your app with BlueVia APIs is that it will only work for Telefonica customers, thus restricting your market or forcing you to code to different APIs for other operators. “If you want to expose an API in the way that Telefonica is doing, you need to be a Telefonica customer in order to be able to use it,” says Jose Valles, Head of BlueVia at Telefonica.

If you further restrict your app’s market by targeting only Windows Phone, it gets small indeed.

Valles says there is hope for improvement. “We are working with the industry and with WAC in order to standardise this API,” says, assuring me that the reaction is “very positive”. WAC is the Wholesale Applications Community, a cross-industry forum for tackling fragmentation. Do not count on it though; it strikes me as unlikely that a cross-industry group would accept BlueVia’s APIs as-is.

There is also a glimpse of the challenges facing developers trying to exploit this market in the BlueVia forums. This user observes:

During the submission process we could only submit the app for a single device model while it is actually supported on hundreds of models. So please also explain how to specify all the supported models during the submission process

The answer: BlueVia has defined around 20 groups of compatible devices, and you can only upload your app for one at a time. 20 uploads is better than hundreds, but still demonstrates the effort involved in trying to attain any kind of broad reach through this channel.

BlueVia is in beta, but Valles says this will change “in the next few weeks”. That said, it is already up and running and has 600 developers signed up. “It is already commercial, whoever wants to come in just needs to email and we will send it to him,” he says.

The idea of the operator sharing its ongoing revenue with app developers is a good one, but be prepared to work hard to make it a reality.

Windows 7 Service Pack 1 install failures common?

There are reports coming in of Windows 7 install failures causing problems for users. There will always be some failures, but normally there is an easy way to rollback; unfortunately SP1 is making machines unbootable in a number of cases:

I have about 10pc’s in my company. They all failed this morning after the service pack 1 for windows 7 x64 systems.

I wonder on a global scale what financial damage this service pack caused. Isn’t a service pack made for fixing issues instead of creating new ones.

So now what? Tomorrow windows installs it again and the company stops working again? Is there a fixed update in the making???

A typical issue is “fatal error c0000034 applying update operation”.

If this happens to you, there are some emergency fixes suggested in the thread referenced above.

Where is Microsoft going with its Rich Client API? Microsoft drops some clues as developers fret

A discussion taking place in a Windows Presentation Foundation (WPF) newsgroup, in a thread called WPF vNext, shows how Microsoft’s confused rich client development strategy is affecting developers, and offers some clues about what is coming.

Developer Rudi Grobler, who posted on his blog some wishes for Windows Phone, Silverlight and WPF, describes his difficulty in discerning Microsoft’s direction:

The strategy for the future is very vague… I daily get questions about should I use WPF or Silverlight? Is WPF dead? Is Silverlight dead? etc…

Jeremiah Morrill describes his frustration with WPF performance:

Microsoft has known of WPF’s performance problems since the first time they wrote a line of code for it.  You will be hard pressed to find a customer that hasn’t complained about perf issues.  And you will not have gone to a PDC in the last few years and not hear folks bring this up to the WPF team. This is 3rd party info by now, but I’ve been told the issues I have noted have been brought up internally, only to be disregarded.

and remarks his frustration with what has happened to Silverlight:

Silverlight’s strategy USED to be about cross-platform, get-the-runtime-on-every-device-out-there, but it’s obvious that is not the strategy any more.  What happened to Silverlight on set-top-boxes?  Android? I read an article that some people saw it on XBox, but nobody has talked about it since.  Cross-platform with OSX has become symbolic at best.

Developer Peter O’Hanlon describes how the uncertainty has affected his business:

I run a small consultancy, and I bet the company on WPF because I could sell the benefits of faster development time for desktop applications. We have spent a lot of time learning the ins and outs of the platform and saw that Silverlight gave us a good fit for developing web apps. In one speech Microsoft caused me months of work repairing the damage when Muglia seemed to suggest that these technologies are dead and Microsoft are betting the farm on Html 5. We hand our code over to the client once we have finished, and they ask us why they need to invest in a dead technology. I don’t care what you say on this thread, Microsoft gave the impression that html 5 was the way to go.

[…] Muglia’s statement about the future being html caused serious issues for my company. We lost two bids because the managers didn’t want to commit to "dead" technology.

Microsoft’s Jaime Rodrigues, WPF Technical Evangelist, offers the following response:

You are telling us to improve perf in WPF. We hear this loudly and we are trying to figure how to solve it. Unfortunately, there are a few pieces to consider:

1)      First of all,  a lot of our customers are telling us to invest more into Silverlight.  Let’s say (again made up) that demand is  4-to 1. How do we justify a revamp of the graphics architecture in WPF.  This is not trivial work; the expertise in this space is limited, we can’t clone our folks to 5x to meet everyone’s needs.

2)      Let’s assume we did take on the work.  My guess (again, I am not engineering) is that it would take two years to implement and thorougly test a release.  At the stage that WPF is at, a rearchitecture or huge changes on the graphics stack would be 80% about testing and 20% about the dev work.    It is not a trivial amount of work.   Would we get the performance you want across myriad of devices? We don’t know. WPF bet on hardware, and there is new devices out  there that are trading hardware for battery, weight, or simply for cost.  it would suck to do that much work, make you wait a long time, and then not get there. Let’s get real on the asks; you say "improve perf" but you are asking us to do a "significant re-write"; these two asks are different.

3)      By the time we get there, what will be a more powerful framework?  Silverlight, WPF, C++, or SuperNew.Next ??  we don’t know today.  We go back to #1 and look at demand We are in agreement that "customers" is the driving principle.

The WPF has looked at the trade-offs, and risk many times.  We are also looking at what customers need. Jer, to you it is all about graphics.  To many others, it is about data.  So, how do we serve all customers??
The strategy is exactly what you have seen/heard:

1)      WPF 4.5 is going to have some significant data binding performance improvements.

2)      We are not redoing the graphics framework, but we are doing a lot of work to let you interoperate with lower level graphics so that if you need more graphics perf you can get it, and still keep the RAD of the rest of the framework.

[…] Hope it helps; apologies if it does not, and again, wait for Rob Relyea or someone else to make it official.  That is just my 2c as a person who bet heavily on WPF but has seen the data that drives the trade-offs the team has to make.

This will be disappointing to former Microsoft evangelist Scott Barnes, who has initiated a Fix WPF campaign.

The problem though is lack of clarity about the strategy. Look at Rodrigue’s third point above. Nobody can predict the future; but what is Microsoft’s current bet? Silverlight, HTML5, or maybe SuperNew.Next – for example, the rumoured new native code UI for Windows 8 or some variant of it?

My own view is that the current difficulties are rooted in what happened with Longhorn and the fact that the Windows team abandoned WPF back in 2004. I’ve written this up in more detail here.

Lest this post be misinterpreted, let me emphasise that Microsoft has a good track record in terms of supporting its Windows APIs long-term, even the ones that become non-strategic. Applications built with the first version of .NET still run; applications built with Visual Basic 6 mostly still run; applications built for ancient versions of Windows often still run or can be coaxed into running. Build an application with WPF or Silverlight today, and it will continue to work and be supported for many years to come.

My guess is that events like the coming 2011 MVP Summit and Mix 2011 in April will bring some clarity about Microsoft’s mobile, tablet, Windows and cross-platform story for rich clients.

Update: Barnes has his own take on this discussion here.

Microsoft still paying the price for botched Vista with muddled development strategy

Professional Developers Conference 2003. Windows Longhorn is revealed, with three “pillars”:

  • Avalon, later named Windows Presentation Foundation (WPF)
  • Indigo, later named Windows Communication Foundation (WCF)
  • WinFS, the relational file system that was later abandoned

With the benefit of hindsight, Microsoft got many things right with the vision it set out at PDC 2003. The company saw that a revolution in user interface technology was under way, driven by the powerful graphics capabilities of modern hardware, and that the old Win32 graphics API would have to be replaced, much as Windows itself replaced DOS and the command-line. XAML and WPF was its answer, bringing together .NET, DirectX, vector graphics, XML and declarative programming to form a new, rich, presentation framework that was both designer-friendly and programmer-friendly.

Microsoft also had plans to take a cut-down version of WPF cross-platform as a browser plugin. WPF/Everywhere, which became Silverlight, was to take WPF to the Mac and to mobile devices.

I still recall the early demos of Avalon, which greatly impressed me: beautiful, rich designs which made traditional Windows applications look dated.

Unfortunately Microsoft largely failed to execute its vision. The preview of Longhorn handed out at PDC, which used Avalon for its GUI, was desperately slow.

Fast forward to April 2005, and Windows geek Paul Thurrott reports on Longhorn progress:

I’m reflecting a bit on Longhorn 5048. My thoughts are not positive, not positive at all. This is a painful build to have to deal with after a year of waiting, a step back in some ways. I hope Microsoft has surprises up their sleeves. This has the makings of a train wreck.

Thurrott was right. But why did Longhorn go backwards? Well, at some point – and I am not sure of the date, but I think sometime in 2004 – Microsoft decided that the .NET API for Longhorn was not working, performance was too bad, defects too many. The Windows build was rebased on the code for Server 2003 and most of .NET was removed, as documented by Richard Grimes.

Vista as we now know was not a success for Microsoft, though it was by no means all bad and laid the foundation for the well-received Windows 7. My point though is how this impacted Microsoft’s strategy for the client API. WPF was shipped in Longhorn, and also back-ported to Windows XP, but it was there as a runtime for custom applications, not as part of the core operating system.

One way of seeing this is that when Longhorn ran into the ground and had to be reset, the Windows team within Microsoft vowed never again to depend on .NET. While I do not know if this is correct, as a model it makes sense of what has subsequently happened with Silverlight, IE and HTML5, and Windows Phone:

  • Windows team talks up IE9 at PDC 2010 and does not mention Silverlight
  • Microsoft refuses to deliver a tablet version of Windows Phone OS with its .NET application API, favouring some future version of full Windows instead

Note that in 2008 Microsoft advertised for a job vacancy including this in the description:

We will be determining the new Windows user interface guidelines and building a platform that supports it. We’ll eliminate much of the drudgery of Win32 UI development and enable rich, graphical, animated user interface by using markup based UI and a small, high performance, native code runtime.

In other words, the Windows team has possibly been working on its own native code equivalent to XAML and WPF, or perhaps a native code runtime for XAML presentation markup. Maybe this could appear in Windows 8 and support a new touch-oriented user interface.

In the meantime though, Microsoft’s developer division has continued a strong push for .NET, Silverlight and most recently Windows Phone. Look at Visual Studio or talk to the development folk, and you still get the impression that this is the future of Windows client applications.

All this adds up to a muddled development story, which is costly when it comes to evangelising the platform.

In particular, eight years after PDC 2003 there is no clarity about Microsoft’s rich client or RIA (Rich Internet Application) designer and developer story. Is it really WPF, Silverlight and .NET, or is it some new API yet to be revealed, or will IE9 as a runtime play a key role?

There is now a little bit more evidence for this confusion and its cost; but this post is long enough and I have covered it separately.

Exchange 2007 to 2010 migration hassles

I have been running Exchange 2010 for a while now, but over the weekend decided to retire Exchange 2007 which was running alongside it in a “just in case” kind of way. This turned out to be more hassle than I had expected. In principle removing your last Exchange 2007 box is simple enough: first check that that all the data has been migrated, then uninstall it from Control Panel. The catch is that Exchange will refuse to uninstall if it detects certain conditions.

The first problem I discovered was that my Exchange public folders had not replicated to Exchange 2010, even though I thought I had set this up. You are meant to run the script MoveAllReplicas.ps1, but I ran into an error that, from what I can tell, is a common one:

Set-PublicFolder : The parameter "Replicas" cannot be $null or an empty array.

Although I found many references to this error, I did not come across any direct solutions. However, I did find Microsoft’s public folder management utility – no, not the one built into the Exchange Management Console, but one of those little utilities created by a member of the Exchange team to make up for deficiencies in the official tools. This is called Exfolders, and replaces a similar tool called PFDAVAdmin. When I ran Exfolders I found I could not log on to the Exchange database, with the error reported being:

An error occurred while trying to establish a connection to the Exchange server. Exception: The Active Directory user wasn’t found.

This led me to an informative blog post that refers to this official post, which describes a problem which occurs on Exchange systems on which Exchange 2000 or 2003 previously existed. Read the post for more details; but the fix is to dive into ADSI Edit (Active Directory Services Interface Editor) which is a low-level editing tool for Active Directory similar in some respects to Regedit and equally hazardous. You have to find and delete the empty Servers container relating to the obsolete Exchange 2003 First Administrative Group.

image

No, it is not intuitive; yes, most would consider it a bug; and Microsoft now adds:

Removed the reference to upcoming fix (no fix current planned)

The benefit though was that ExFolders now worked. Using this tool I manually created public folder replicas on Exchange 2010 and replication happened at last.

I waited for replication to complete, then tried again with MoveAllReplicas.ps1. I still got the same error though. I went back to ExFolders and successfully deleted the replicas shown on the old Exchange 2007 box, but when I tried to delete the public folder database itself got an error stating that replicas existed. In consequence, Exchange 2007 could not be uninstalled. Of course I could just have shut the machine down forever; but I do not recommend this – you end up with references in Active Directory to an Exchange server that no longer exists, which only causes problems.

The solution was to go back to ADSI Edit and delete the reference to the obstinate Public Folder Store, as recommended by Microsoft’s Ben Winzenz here.

Exchange 2007 now uninstalled cleanly and I have the VM space I need to try Microsoft Lync, which I noticed getting some attention at Mobile World Congress last week.

IE9 in Windows Phone will be good for cross-platform JavaScript and HTML5 apps

Microsoft CEO Steve Ballmer, accompanied by Nokia’s Stephen Elop, showed coming updates for Windows Phone 7 at a Mobile World Congress keynote last night.

A minor update due in early March will add copy and paste, and CDMA support is also coming in the first half of 2011.

The more interesting update is planned for the second half of 2011 – I’m guessing late this year – and will have multi-tasking for 3rd party apps, as well as a mobile version of Internet Explorer 9. We were told that this will feature the same HTML 5 standards support and hardware acceleration as in the desktop version.

Windows Phone VP Joe Belfiore showed the fish demo running on Windows Phone with IE9 alongside Safari on the iPhone. The iPhone fish jerk slowly across the screen.

image 

Note that Apple will likely have a new iPhone out before mobile IE9 is ready, which may well equal or exceed IE9’s graphics performance.

Nevertheless, this is interesting for developers since it means that the fast “Chakra” JavaScript runtime will be available on the device. HTML and JavaScript is one route to cross-platform mobile applications.

Silverlight on Windows Phone includes a WebBrowser control which has access to isolated storage. This means you could write most of your app in cross-platform JavaScript and HTML, but wrap it in Silverlight for access to native phone features.

It is a shame though that Microsoft does not include the Sqlite local database engine found in WebKit-based mobile browsers. Sqlite is in the public domain so this may be an example of the “not invented here” syndrome. Microsoft does not even have SQL Compact Edition in Windows Phone 7, though it would not surprise me if this also appears in the autumn update. Full details are being held back until the Mix conference in April.

Although it has not been stated, it would make sense for this update to be used in the first Windows Phones from Nokia. On Sunday evening, Nokia stated its desire to deliver a Windows Phone device before the end of the year.

Qt will not be ported to Windows Phone 7 says Nokia

Director of the Qt Ecosystem Daniel Kihlberg has posted officially on the future of Qt, Nokia’s cross-platform application framework.

However you spin it, Nokia’s change of direction, relegating Symbian to low-end phones and focusing on Windows Phone as its Smartphone platform, is not good for Qt developers. Kihlberg offers a glimmer of hope for MeeGo though. Whereas CEO Stephen Elop was almost dismissive of MeeGo, saying that a device would be released as part of a learning process, Kihlberg positions it as a source of future disruption:

Nokia also announced it will ship its first MeeGo-related device in 2011, which will rely on the Qt ecosystem – and then will continue with MeeGo as an open source project for future disruption.  Nokia can’t afford to be behind the next disruption again and Qt can play an important role in making sure it isn’t.

But why not port Qt to Windows Phone, which needs a native development stack? Nokia’s Aron Kozak states in a comment:

Qt will not be ported to Windows Phone 7. One of the key benefits of joining an established ecosystem is that there is an established toolchain that everyone uses. All Windows Phone apps will run on all WP7 devices. Adding Qt to the mix would only cause fragmentation.

Unfortunate from a Qt perspective but wise from a developer ecosystem perspective.

In truth, this is near-fatal for the future of Qt at Nokia:

I have to say, Nokia made a bad decision jumping to WP7 knowing that Qt wouldn’t be on it. Now that Nokia did this, they basically went from Qt “Code once, run everywhere” to “Code once, run nowhere”.

says developer Keith Rusler.

The other problem is that developers feel misled:

When Elop came in he said that Qt will be the main framework. Symbian and MeeGo would be unified through Qt. We all stopped working on Symbian C++ and started learning Qt. We have now wasted 6 motnhs of our family’s lives on a dead end. If I knew this was going to happen, I would have started learning Java instead!

Irrespective of the business merits of Elop’s decision, the truth is that its relationship with developers has been deeply wounded. I am not sure how it could have been better handled – except that I think Nokia should have insisted on Qt support in Windows Phone – but I still observe that it has been handled badly. The evidence suggests that Elop under-estimates the importance of nurturing developers in the ecosystems he talks so much about.

Restoring an old Small Business Server 2008 backup: beware expired Active Directory

Seemingly tricky problems sometimes have simple solutions – but you have to find them first.

So it was with this one. I was asked to recover some emails from Small Business Server, from a backup that was about six months old. This SBS runs on Hyper-V using a proven backup system and I decided to restore onto a test system just to recover the emails. All went well until the first boot. The restored SBS went into a reboot cycle. Trying safe mode revealed the error:

STOP: c00002e2 Directory Services could not start because of the following error: A device attached to the system is not functioning. Error Status: 0xc0000001

The suggested fix for this is to boot into Directory Services Restore Mode. In my case this was not possible, because after the first failure the VM booted into Windows Error Recovery mode which does not offer Directory Services Restore Mode. Rather than try to get round this, I simply restored the server again, and took a snapshot before the first boot so I would not have to do so again.

I could now get into Directory Services Restore Mode, though note that you need to log on as .\administrator using the password set when SBS 2008 was installed. I tried some of the steps here with little success. The suggested ntdsutil commands did not work. I had to activate an instance, which by the way is ntds, and then got a message saying the operation failed because the system was in Directory Services Restore Mode and to try rebooting. I knew what the result would be.

In other words, I was getting nowhere. Then I found a user with a similar problem. The reason: Active Directory will not restore if it is older than the “tombstone lifetime”. This is nicely explained here. It is to do replication. Active Directory is designed to replicate between domain controllers, which means it has to keep a record of deleted items. If a particular instance is older than the tombstone lifetime, it could not replicate safely, hence the error message.

Well, kind-of. Note that the error message says, “A device attached to the system is not functioning”. If only it could have said, “Active Directory is too old”, that would have saved some time. Note also that SBS is often the sole domain controller, making the problem irrelevant. Note further that in my case I did not care a jot about replication, since all I needed was some emails.

Still, it gave me an easy solution. Just set the date back in Hyper-V and reboot. Everything worked fine.

In the end it did not cost me too much time, and doing this stuff in Hyper-V while getting on with your work during the slow bits is a lot more fun than when using real systems.

I do find it interesting though how these simple problems can surface as bewildering errors that lead you through a maze of obscure technical documents before you find the simple solution.