-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WinGet on Windows Server Core #4319
Comments
Some additional context and thoughts for this issue. I will refer to Windows Servers default install, without Desktop Experience, as "Windows Server Core" or "Server Core" for brevity, even though that term is no longer officially correct.
@Karl-WE tagging you because you had some thoughts on this as well. You specifically said:
Source. Personally, as I've explained above I am against a whitelisting approach and think due to the impossibility of determining a software as "for sure 100% incompatible" with Server Core, winget should at most warn the user and never prohibit package installations. |
@jantari was a long read but I agree with you in most parts. Also your reasons with or better said against whitelisting are very reasonable. Thanks for adding your valueable thoughts. I strongly agree on the mixed environment of core and GUI install options and the adoption rate of winget. Personally would like to focus on Windows Server 2025 as supported and 2022 as unsupported. 2019 is out of mainstream support and as such no hope, by definition, for any change or backport. |
In general, I agree with what was stated. There may be some minor differences in my thinking currently. Adding "allow" or "deny" lists in WinGet is something I'm currently opposed to. That kind of granularity comes with too much overhead. That's why we created the REST APIs, so enterprise customers could select which packages (and versions) they wanted to support in their own source. Of course, that means we have all kinds of interesting policies in the WinGet community repository, but the client was designed with many of these use cases in mind for future scenarios. WinGet does have the "--force" argument, which is essentially giving users the ability to tell WinGet: "I don't really care what you think, or what the manifest says, just do what I told you. 😊" Given that, I think having some kind of metadata in the manifest describing which target OS platform/versions a package has been tested or verified against is goodness. The client would essentially make determinations as it does today with respect to which installer it thinks is most appropriate for the device at the point in time the command is run. If no suitable match is found, WinGet would report the results, but the user could simply force the "install"/"upgrade". If an existing version of the package is present on the system, there are other implications to consider, but I agree. An administrator should be able to override the default behavior and manage packages how they see fit. There are several dimensions evaluated when selecting an installer. I don't know if we need to extend the list, but I'm including it below for reference. I think extending "Target Platform" makes the most sense in the context of this discussion. I'm also thinking on Server without desktop experience, the default installation mode should be "silent".
|
Hi @denelon would using the language value from this registry key be translatable to a locale? |
Looking at ProcessMonitor, winget or a library used by it currently already queries However I believe the problem with both these keys is that they show the machine locale and winget would probably rather use the current user's locale preference. Quickly searching through the current user's registry with
There are probably more approved ways to get to this information too, because the
I haven't debugged whether these call Core-compatible APIs or access the registry directly, but I'd expect sixteen layers of enterprisey factory-factories aka APIs so that should be good for winget. Unrelated, I'll soon have some more details on the Server Core 2022 compatibility of winget. My original observations in February were somewhat flawed because I was working on a system I had already experimented on and tried lots of things prior so it turns out it's not JUST that one API call after all. |
Update with additional observations regarding Server Core (2022) compatibility: I have to make a late follow-up to this post; what I observed above isn't incorrect but I have just deployed a new, untouched Server 2022 Core and made some additional observations. The VM I had used for the troubleshooting above wasn't "clean" because I had already experimented a bunch trying to get winget to run, so here's my new (re-)discoveries: winget depends on Just adding this file has already allowed winget on my new, vanilla Server 2022 Core VM to install some packages, however another package was still failing to install with the dreaded On my GUI systems there's a registry key ( This workaround makes winget find the correct DLL it's looking for under the wrong name without having to edit global registry keys or system directories which could confuse and break other applications. Now, interestingly, after applying these two fixes I currently do NOT need to set my locale preference using the winget Copy-pasted from the related discussion #2361 (reply in thread) |
I'd like WinGet to function correctly on Windows Server Core. The main gap identified by @jantari was related to the way WinGet determines the locale for package metadata.
Quote from the discussion below:
I looked into it and this API does appear to not be present in Server Core (meaning this error from our call to it is expected). That of course depends on my ability to map from the internal identifier to the marketing name, which should not be considered infallible.
I think at this point we could confidently wrap the implementation of
Locale::GetUserPreferredLanguages
to prevent the error from escaping. The default state would be that locale was not included in the installer selection if the call failed.This is a good workaround in the interim.
Originally posted by @JohnMcPMS in #2361 (reply in thread)
The text was updated successfully, but these errors were encountered: