Comment by fpig
8 years ago
Wait so are you saying UWP apps can now access the machine they're running on in a sane manner (so, limited only by the privileges of the user who ran the app, without additional limitations enforced by the platform itself)?
Because that was the main limitation of Metro apps, you couldn't really do anything useful with them, you couldn't even access the hard drive normally or edit the windows registry. This is why you couldn't "upgrade". It wasn't an upgrade to any previous tech, it was a downgrade as the platform literally had less capabilities. It is, or at least was, basically a platform for making sandboxed mobile apps that you can run on the desktop...
This is why they clearly weren't (at least Metro, I haven't worked with UWP) an "upgrade" to anything. Silverlight wasn't an "upgrade" to WPF for the exact same reason. It was a more limited platform and you couldn't switch WPF apps over. So MS calling Silverlight or Metro a new version of WPF would have been retarded.
Things are still sandboxed, but the sandbox has grown a lot since early Windows 8 ("Metro" era). Depending on your definition of "sane", it seems rather "sane" to me to have at least some sandbox protection of the applications to run. Yes, Windows 8 felt like a straight-jacket more than a sandbox to some, but current UWP, especially with .NET Standard 2.0 support in the FCU, at least builds with most of the libraries even if some of them are essentially no-ops or (security) exceptions at runtime.
So, you still can't touch the registry by default, but why would you want to? There are much better places to store stuff.
The UWP is meant to be a replacement for Win32, so it shouldn't be a shock that a lot of Win32 components aren't available by default.
However, you can use the Desktop Bridge and request permission in your app manifest for more privileges, including things like registry access. The Desktop Bridge has a lot of examples out there on things you can do. You can use the Desktop Bridge to transition a WPF app slowly to UWP over time. For instance, you could launch UWP screens from your WPF app, allowing you to move piece-at-a-time if you wanted. There are even samples on how to migrate settings currently stored in the registry (ugh, why) over to Local AppData storage like a proper application, to transition away from Win32 bad practices. (Of course, the parts of the application that need the Desktop Bridge will only work on Windows with a Win32 subsystem.)