zlacker

Win32 App Isolation

submitted by pjmlp+(OP) on 2023-05-24 16:02:07 | 117 points 89 comments
[view article] [source] [go to bottom]

NOTE: showing posts with links only show all posts
1. gjsman+n5[view] [source] 2023-05-24 16:20:18
>>pjmlp+(OP)
Yay, it's the latest attempt at Project Centennial!

(For context, Microsoft has been trying for 7 years various methods to get developers to please package their apps in some way. Almost nobody has ever bit - to the point the Microsoft Store only has been having some recent success by promising packaging isn't required.)

https://petri.com/microsofts-project-centennial-unsuccessful...

◧◩◪
13. Avery3+Tg[view] [source] [discussion] 2023-05-24 17:04:54
>>mike_h+Pd
AppContainers have supported win32 from the start, not just WinRT.

See:

https://learn.microsoft.com/en-us/windows/win32/secauthz/app...

https://learn.microsoft.com/en-us/windows/win32/api/userenv/...

https://scorpiosoftware.net/2019/01/15/fun-with-appcontainer...

◧◩◪
20. derefr+bj[view] [source] [discussion] 2023-05-24 17:13:09
>>gjsman+38
It's odd that it failed; https://en.wikipedia.org/wiki/VMware_ThinApp was doing this literally 20 years ago and worked just fine. (I used it myself.)

IIRC, it used a filesystem driver shim that rerouted all FS writes during installation into an overlay filesystem image; and then generated a self-unpacking executable, embedding that overlay image, that unpacked the core EXE and spawned it shimmed to read from the overlay image.

What did Windows 10X do that was different than that?

◧◩
33. pjmlp+yn[view] [source] [discussion] 2023-05-24 17:30:40
>>mike_h+8i
This is the continuation of bringing UWP security model into Win32, and make Windows security features all enabled by default.

See BlueHat IL talk on the matter,

https://youtu.be/8T6ClX-y2AE

There are no plans for Windows 10, beyond security fixes until 2025, it is done.

EDIT: There is a BUILD 2023 talk on the matter as well.

https://youtu.be/w6VwHGPz12w

◧◩◪◨⬒
34. mike_h+Dn[view] [source] [discussion] 2023-05-24 17:30:56
>>mey+zh
JVM UI isn't so bad. I've written some pretty modern looking UI with it. The sophisticated controls are all there.

Modern JavaFX theme: https://github.com/mkpaz/atlantafx

Modern Swing theme: https://github.com/JFormDesigner/FlatLaf

And these days Compose Multiplatform: https://www.jetbrains.com/lp/compose-multiplatform/

I tend to use Kotlin rather than Java but of course Java is perfectly fine too. You can also use Clojure.

If you use any of those frameworks you can distribute to Win/Mac/Linux in one command with Conveyor. It's free for open source apps and can do self-signing for Windows if you don't want to pay for the certificates or the Store (but the Store is super cheap these days, $19 one off payment for an individual). Also supports Electron and Flutter if you want to use those.

From those frameworks you can then access whatever parts of the Windows API you want. Flutter even has WinRT bindings these days! So it's not quite so bad.

◧◩
54. mastax+cq1[view] [source] [discussion] 2023-05-24 23:51:43
>>gjsman+n5
I have spent weeks of my life trying to get windows packaging to work. Twice with APPX, twice with MSIX. Mostly with greenfield C# apps, sometimes with existing WPF apps. Every year I think: surely it'll work now, they just published another blog post touting the new features? No. Every time I run into something that's not documented how to be done, something that's not implemented, or something that's broken, often with a detailed bug report that nobody at Microsoft has bothered responding to (e.g. [0] one of many).

Windows is in maintenance mode. Nothing new and substantial they create will ever get to a working state, they just don't have the resources. I have given up.

[0]: https://github.com/microsoft/microsoft-ui-xaml/issues/8141

◧◩◪◨⬒
56. ripley+Pu1[view] [source] [discussion] 2023-05-25 00:26:34
>>onepla+AS
I thought jobs were used for Windows Containers: "Windows containers utilize job objects to group and track processes associated with each container. Resource controls are implemented on the parent job object associated with the container."

https://learn.microsoft.com/en-us/virtualization/windowscont...

◧◩◪◨
62. jasomi+jG1[view] [source] [discussion] 2023-05-25 02:30:08
>>alkona+Ag
I actually like WiX[1] — it has a bit of a learning curve, but, so long as I'm building on Windows and don't stray far from the default UI flows, I haven't found an easier tool for creating Windows installers as part of a product build process, especially those that require Windows-specific bits like COM component registration, Windows service management, setting restrictive ACLs on installed components, etc.

And while I'm not aware of any way to sandbox Windows Installer itself, I'm curious if AppContainer isolation can be applied to applications and services installed via MSI, which would still be quite useful even if the installation process itself is unrestricted.

Alternatively, now that MSIX supports service installation[2], I wonder whether an MSIX including a Windows service and a collection of client applications can be configured so everything runs within one AppContainer, isolated from the rest of the system, and whether permission to access specific external directories chosen by users in a configuration GUI can be transparently (to the user) delegated to the related service.

Alas, none of this is useful to me unless it's compatible with at least the most recent version of Windows 10: very few of my customers are running Windows 11, and I suspect many won't upgrade until Windows 10 is no longer supported (optimistically; as of last year, I was still getting occasional support requests from customers running older versions of our software on Windows Server 2003 R2).

[1] https://wixtoolset.org

[2] https://learn.microsoft.com/en-us/windows/msix/supported-pla...

◧◩◪◨⬒
74. iggldi+ju2[view] [source] [discussion] 2023-05-25 11:52:01
>>mike_h+F82
> The Mac sandbox grants access to the whole directory when a file is selected, iirc.

Does it, by default? https://developer.apple.com/documentation/security/app_sandb... [1] doesn't look like it, and there seem to be special features for requesting access to related files which wouldn't be necessary if selecting a file gave you access to the whole directory. Though I've got no Mac, so no idea how this actually works in practice – maybe you're right, though it'd also noticeably weaken the sandbox, which seems strange.

> I'm curious what you mean by customized UX around file I/O?

Simply things like a directory tree control integrated into the UI, IrfanView's directory switcher (when you reach the start or end of a directory while browsing through your pictures, it pops up a dialogue that allows you to easily – and without having to use the mouse – navigate up and down the directory tree to a different folder), or even something as simple text input control that allows direct editing instead of always having to go via an official OS file picker.

[1] It seems like Apple does have some support for storing relative file references after all ("document-scoped bookmarks"), so that picking something like a master project file also gives access to all related documents, no matter how complex the file format is, though I have no idea whether those really work even when moving files between different devices, and they almost certainly won't work for cross-platform file formats, because non-Mac software will of course have no idea about that kind of thing. And last time I looked, Android's and Windows's sandbox implementation didn't have anything comparable, and Linux likely doesn't, either…

[go to top]