You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows 11 (Business, 24H2), through WSL (Ubuntu 24.04.1)
What type of computer (i.e. laptop, desktop, Raspberry Pi)?
Laptop
My fix
As per this page, WMIC is deprecated in newer versions of Windows (though WMI itself is not). I solved the issue locally by replacing the line wmic os get osarchitecture with (Get-WmiObject -Class Win32_OperatingSystem).OSArchitecture in both webi/webi-pwsh.ps1 and _webi/package-install.tpl.ps1. This alternative works on both older and newer versions of Powershell, and outputs in a similar enough format that related code works with no additional changes.
The text was updated successfully, but these errors were encountered:
Pretty sure I know what went wrong and how to fix, but I'll answer the standard questions anyway and put my own thoughts at the bottom.
What were you trying to install (or what else went wrong)?
While running a WebInstall for Caddy, webi-pwsh.ps1 had an error "The term 'wmic' is not recognized..."
What exactly did you do?
On a machine running Windows 11. Ran "curl.exe https://webi.ms/caddy | powershell" as per https://webinstall.dev/caddy/
What went wrong?
Which OS did you try on?
Windows 11 (Business, 24H2), through WSL (Ubuntu 24.04.1)
What type of computer (i.e. laptop, desktop, Raspberry Pi)?
Laptop
My fix
As per this page, WMIC is deprecated in newer versions of Windows (though WMI itself is not). I solved the issue locally by replacing the line
wmic os get osarchitecture
with(Get-WmiObject -Class Win32_OperatingSystem).OSArchitecture
in both webi/webi-pwsh.ps1 and _webi/package-install.tpl.ps1. This alternative works on both older and newer versions of Powershell, and outputs in a similar enough format that related code works with no additional changes.The text was updated successfully, but these errors were encountered: