mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-02-14 17:49:53 +00:00
fix(windows): use Get-CimInstance instead of deprecated Get-WmiObject
This commit is contained in:
@@ -88,7 +88,7 @@ function Get-UserAgent {
|
||||
IF ($my_arch -eq "AMD64") {
|
||||
# Because PowerShell is sometimes AMD64 on Windows 10 ARM
|
||||
# See https://oofhours.com/2020/02/04/powershell-on-windows-10-arm64/
|
||||
$my_os_arch = (Get-WmiObject -Class Win32_OperatingSystem).OSArchitecture
|
||||
$my_os_arch = (Get-CimInstance -ClassName Win32_OperatingSystem).OSArchitecture
|
||||
|
||||
# Using -clike because of the trailing newline
|
||||
IF ($my_os_arch -clike "ARM 64*") {
|
||||
|
||||
@@ -7,7 +7,7 @@ IF ($my_arch -eq $null -or $my_arch -eq "") {
|
||||
IF ($my_arch -eq "AMD64") {
|
||||
# Because PowerShell isn't ARM yet.
|
||||
# See https://oofhours.com/2020/02/04/powershell-on-windows-10-arm64/
|
||||
$my_os_arch = (Get-WmiObject -Class Win32_OperatingSystem).OSArchitecture
|
||||
$my_os_arch = (Get-CimInstance -ClassName Win32_OperatingSystem).OSArchitecture
|
||||
|
||||
# Using -clike because of the trailing newline
|
||||
IF ($my_os_arch -clike "ARM 64*") {
|
||||
|
||||
@@ -90,7 +90,7 @@ function Get-UserAgent {
|
||||
IF ($my_arch -eq "AMD64") {
|
||||
# Because PowerShell is sometimes AMD64 on Windows 10 ARM
|
||||
# See https://oofhours.com/2020/02/04/powershell-on-windows-10-arm64/
|
||||
$my_os_arch = (Get-WmiObject -Class Win32_OperatingSystem).OSArchitecture
|
||||
$my_os_arch = (Get-CimInstance -ClassName Win32_OperatingSystem).OSArchitecture
|
||||
|
||||
# Using -clike because of the trailing newline
|
||||
IF ($my_os_arch -clike "ARM 64*") {
|
||||
|
||||
Reference in New Issue
Block a user