-
I discovered winget recently and it's really convenient tool. And it's opensource, truly grateful for that. I've learned from winget install learning that current position about scripts is Is it just current policy until winget will grow? Or is something more fundamental? If it was possible to install packages that are using .bat scripts (possibly libraries that are compilated in the process) that would me an amazing leap for package management on Windows. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
The problem with scripts is they can break absurdly easily, and are hard to validate en masse. Unlike Linux and other Unix-likes, where post-install scripts are pretty common, on Windows, most if not all the time the post-install requirements are either handled by the installer itself as its last steps or on first app launch. Its just not as required on Windows imo |
Beta Was this translation helpful? Give feedback.
-
The biggest issue that I see with scripts (.bat, .sh, .ps1, etc.) is that they are inherently insecure. They can point to remote endpoints that aren't controlled, they can download and run arbitrary code, they can do all sorts of things - both good and bad. |
Beta Was this translation helpful? Give feedback.
-
It is one of our fundamental tenets. We validate installers (portable packages, and .zip compressed packages) and use SHA256 hashing to identify installers so we can easily validate they haven't been modified before installing them. The manifests are declarative and do not directly contain scripts that would also need to be scrutinized and handled via other more complex means. We are working on other solutions to handle the specific cases where pre-deploy or post-deploy actions are required to achieve the desired state for an application to be installed and function properly. It takes years for software and installers to "migrate" to the best state they can be in. I recently came across the 8 Laws of Software Installation from 2015 attributed to @fearthecowboy. We're on a journey to improve package management on Windows. Much of the work still depends on the installers. We will do as much as we can to help developers and our customers "fall into the pit of success", and it will take time. |
Beta Was this translation helpful? Give feedback.
-
@Andrej730 there has also been a previous issue on this topic with some additional discussion: #299 I have also commented there why I believe this would be an amazing leap ... backwards ... for package management on Windows 😉 The chocolatey package manager uses the script-driven-installs approach and it is riddled with problems for it. With winget, it's time to hopefully improve on the status quo. |
Beta Was this translation helpful? Give feedback.
It is one of our fundamental tenets.
We validate installers (portable packages, and .zip compressed packages) and use SHA256 hashing to identify installers so we can easily validate they haven't been modified before installing them. The manifests are declarative and do not directly contain scripts that would also need to be scrutinized and handled via other more complex means.
We are working on other solutions to handle the specific cases where pre-deploy or post-deploy actions are required to achieve the desired state for an application to be installed and function properly.
It takes years for software and installers to "migrate" to the best state they can be in. I recently came across t…