Running Your .NET Apps on Embedded Versions of Windows
Tim Huckaby shows readers why using Windows Embedded is helpful for developing applications.
September 19, 2013
![Running Your .NET Apps on Embedded Versions of Windows Running Your .NET Apps on Embedded Versions of Windows](https://eu-images.contentstack.com/v3/assets/blt07f68461ccd75245/blt8eefd5ddd8c6689b/661931328be7866f0d0a129b/windowsembedded_0_4.jpg?width=1280&auto=webp&quality=95&format=jpg&disable=upscale)
I really didn't know anything significant about embedded versions of Windows until just recently. Throughout my career there wasn't really a need to know anything about embedded versions of Windows. My company, InterKnowlogy, builds custom software. Our deliverable is typically a Visual Studio project with source and a set of installable binaries. When I started a software product company several years ago, I had no idea I'd ever wander into the realm of embedded OSs and configuration management. The deliverable in this software product company, Actus Interactive Software, is typically a turnkey system. Although we build software, more often than not we deliver the software installed and configured on turnkey Windows systems. Since the first day the company was in business, I've dealt more and more with hardware providers. And from that first day, every single one of them said something like, "You're going to want to run this on Windows Embedded." But I didn't know until just recently why, and they most certainly couldn't explain it. So, let me try.
Why Use Windows Embedded?
I'm still no expert in embedded Windows OSs, but I've learned so much and will continue to learn. I believe its complexity and lack of guidance are part of the reason for its relatively insignificant adoption compared to the traditional Windows OS. There's so little decent content on the web for research that doesn't read like Latin. Most of the good guidance is written for hardware folks, which makes it really hard for us developer types to interpret. I'm pretty sure if I share what I have learned so far it might help you down the road if you have the right use case to run your app on Windows Embedded, which is half the battle.
Misconceptions, Assumptions, and Windows Embedded Use Cases
By definition Windows Embedded is a family of OSs designed to run on embedded systems. An embedded system is typically embedded as part of a complete device often including the computer hardware. But Windows Embedded doesn't have to run like that. It can be installed on typical computer hardware. Windows Embedded OSs are available to OEM system builders such as hardware distributors and manufacturers who make systems available to end users with software preloaded on the hardware.
Most people like me assumed that Windows Embedded is only for highly targeted C++ or assembly language applications that run on special hardware devices. That's definitely true that those types of applications run on Windows Embedded. But Windows Embedded also runs on standard PC hardware and runs .NET applications brilliantly. So, why would you run a .NET app on Windows Embedded instead of a full-blown version of Windows? The answer is two-fold:
Your application is the only app that's ever going to run on the computer. In my case, my company builds interactive digital signage systems (kiosks). The kiosk/interactive digital signage runs in public places and our customers don't want 12-year-olds killing the app and running a browser or another application. It only runs the interactive digital signage application, 24/7.
You need to produce a certain amount of identically configured systems from the OS to the app. In regular Windows 7, it takes about 3 to 4 hours to properly configure Windows and install our application. Configurations such as preventing the logon screen to Windows from coming up; having our kiosk application start immediately upon boot, turning off autoplay, turning off system messages, turning off screen savers and sleep modes, etc. Can you imagine doing that configuration 400 times? It makes sense in this use case to create one software image where the app and OS are already configured, which can be easily burnt to a machine.
Until recently I also assumed Windows Embedded versions were headless and had no user interface. I assumed that you built a custom application at the metal, and it just integrated with the OS in some magical tool that Microsoft provides. Quite the contrary. As you'll learn, you can configure Windows 7 Embedded to a point where it looks and functions pretty much exactly like the standard version of Windows 7, just faster.
Windows Licensing Cost Savings
It's always about cost and you typically get what you pay for. I frequently say, "There's a reason why Windows licensing is expensive." But the cost of Windows Embedded OSs are significantly less than the regular versions. It depends on several different factors including quantity and versions, but you can expect to pay significantly less for embedded Windows OSs.
Cafeteria-Style Windows Templates
When installing Windows 7 Standard Embedded, the part that confused me so badly was I couldn't seem to find documentation for the plethora of OS templates that are available. I quickly learned that Windows Embedded provides the ability to install only the essential Windows components that are needed to run your application. You can also pick and choose from thousands of Windows OS components and modules, which clearly requires a huge level of knowledge of the Windows architecture. In this way you can strip down the OS to the bare minimum in terms of CPU cycles and disk footprint. But interestingly enough, the very first template on the list is called Application Compatibility. Really it should be called "Full Windows Mode" because that's what it is. And once the template is installed, then it's very difficult to determine the difference between embedded and a full-blown version of Windows.
Lightning Fast
Guess what? It won't surprise you to learn that stripped down, embedded versions of Windows are lightning fast when run on legitimate hardware compared to regular versions of the Windows OS. As you'd imagine, when all the unnecessary services are removed from Windows, it screams. Our interactive digital signage application is built in WPF. It's a beast of an app, and it does a lot. So, it's a burden on a lower end machine. But on legitimate hardware like the Intel NUOC computer we prefer, not only does our application scream, but also Windows screams. Windows Embedded comes up so quickly that we had problems. It booted too quickly. It forced us to make some changes to our local service so it could reliably instantiate and run itself on boot.
Next Month
Ok, so there's a little bit about Windows Embedded and why you'd need it. Next month, I'll delve into the many flavors of the Windows Embedded OS. You'll learn how to get your hands on an embedded version of Windows and learn how to install it. I'll also provide you with some tips on which template to use and how to create a custom template of your own to fit your application needs. I'll also cover all the gotchas, tips, and tricks I learned on the way.
About the Author
You May Also Like