With a recover of a initial PCs regulating Windows 10 S, it’s time to recur how we package and discharge your code.
Up compartment now, Windows has been installer-agnostic, ancillary many opposite ways of removing apps onto PCs: a informed Microsoft installer, third-party tools, Xcopy, or regulating an executable file. Windows 10 S takes a opposite approach, locking PCs down to digitally sealed apps, with tranquil entrance to files, delivered by a Windows Store.
There’s a substantial advantage to regulating a Windows Store for program placement of your applications in a Universal Windows Platform (UWP) .appx format. For one thing, it handles updates automatically, so we don’t need to write your possess refurbish code. It also supports differential updates, minimizing formula downloads. But a Windows Store isn’t a Trojan equine to give Microsoft a cut of all your sales. Even in Windows 10 S, we can discharge .appx installers to Windows 10 users directly (aka “sideloading”) or around Microsoft’s Intune government tools—whether for blurb or inner distribution.
However, this change doesn’t meant normal (Win32) desktop applications can’t run on Windows 10 S, nor does it meant we contingency reconstruct them as UWP apps. Microsoft’s Windows Desktop Bridge collection can take existent your formula and hang it for Windows Store placement to Windows 10 PCs (including those regulating a Windows Store-only Windows 10 S).
Originally denounced as Project Centennial, one of a array of bridges between other platforms and Windows 10’s UWP APIs, a Desktop Bridge is a set of collection that take existent Win32 desktop applications and prepared them for placement in a Windows Store. The routine can be as elementary as jacket formula in a Windows Store installer (as an .appx file) around a Desktop Converter or as formidable as regulating UWP APIs in your formula as partial of a height migration.
The Desktop Bridge proceed does make things some-more complex, yet we shouldn’t see that as a bad thing. You get better, some-more secure apps as result
Beyond ensuring that usually digitally sealed formula can be commissioned on a Windows 10 S PC, Windows 10’s Windows Store installations take advantage of a latest Windows releases’ softened focus security. Instead of giving your formula full entrance to a system, UWP apps keep focus state apart from complement state, with a virtualized registry and a sandbox. It’s a really opposite proceed of working, a prolonged proceed from a free-ranging entrance historically given to desktop applications.
Desktop Converter is a initial step
Using a Desktop App Converter goes a prolonged proceed to bridging a confidence gap, yet not all a way. That’s since we eventually wish to refactor your applications as UWP ones. But in a meantime we can use Desktop Bridge’s several collection to make a pierce in stages.
Conversion starts by downloading a Desktop App Converter. Although not particularly a converter (for one thing, it doesn’t change your code), it does hoop many of a elementary stairs indispensable to prepared formula for a Windows Store. From an existent designation file, it generates all a suitable handlers and record mappings, as good as induction COM servers and generating a certificates indispensable to concede a finished app to implement and run. It also handles validation tests, indicating what changes you’ll need to safeguard an app can run in a some-more compelled Windows Store app environment.
Other options support primer construction of .appx files, that is essential if we use Xcopy rather than an installer, and building Windows Store installers from inside Visual Studio. If you’ve still got entrance to a source formula it’s value holding this route, since it’s a initial step in converting an app from Win32 to UWP. (In tangible formula conversion, you’re not singular to Microsoft’s tools, since there now several third-party installers that work with a Desktop App Converter.)
You should know that your converted desktop apps aren’t sandboxed, so they won’t be as secure as a full UWP app. But they do besiege some pivotal features:
- A private duplicate of a user’s AppData folder handles their focus state, with all reads and writes redirected.
- Similarly, files and folders that would have been in Windows customary folders are in a unsentimental filesystem, stored alongside your app. Application calls are redirected to a app’s possess copies of those files and folders.
- The same happens with a registry, with a internal record holding a application’s possess keys, and a virtualized duplicate of a rest of a registry doing focus writes.
- When we uninstall a converted app, it also deletes a compared unsentimental files and registry, creation cleanup really simple.
The outcome is a many some-more secure app, one that won’t meddle with other applications by installing opposite versions of libraries or changing registry keys. It competence not be as secure as regulating formula in an removed sandbox, yet it’s positively an alleviation over Windows’s normal free-for-all.
Accessing Windows 10 facilities around a UWP APIs
There’s some-more to a Desktop Bridge than providing a Windows Store coupling for comparison apps. It has collection to call UWP APIs from your existent Win32 formula in Visual Studio, as good as adding support for Live Tiles and other Windows 10 features. When you’re prepared to go over a Desktop App Converter phase, we can use Visual Studio to start migrating formula to a Windows 10 platform, eventually delivering a full UWP Windows Store app.
In many cases we won’t even need to write formula to supplement Windows 10 integration. Instead we can use XML pattern files to control how a Desktop Bridge exposes features. These XML pattern files can conclude record associations, set adult firewall rules, and set adult focus startup. Other options hoop deeper formation with Windows 10’s File Explorer, including providing embedded request previews.
But there are some poignant stipulations to fluctuating your existent Win32 apps with a UWP APIs: You won’t be means to take advantage of Windows 10’s authentication facilities or use a built-in capability APIs. In practice, this shouldn’t be too many of an issue, since many comparison formula is standalone and so doesn’t need entrance to these features.
Moving entirely to UWP isn’t unsentimental for many existent applications, so a Desktop Bridge provides a reasonable halt solution. You get entrance to many Windows 10 facilities though carrying to write new code, and during a same time we get a track to an contingent refurbish of your app. It’s not perfect, yet it’s good adequate to take advantage of a Windows Store and Windows 10 S.