winfetch icon indicating copy to clipboard operation
winfetch copied to clipboard

Errors when running `winfetch` on Parallels ARM VM

Open CarterLi opened this issue 3 years ago β€’ 3 comments

PowerShell 7.2.6
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

➜ ~  .\winfetch.ps1

 lllllllllllllll   lllllllllllllll  zhang@WINDOWS
 lllllllllllllll   lllllllllllllll  -------------
 lllllllllllllll   lllllllllllllll  OS: Windows 11 δΈ“δΈšη‰ˆ [ARM 64 位倄理器]
 lllllllllllllll   lllllllllllllll  Host: Parallels International GmbH. Parallels ARM Virtual Machine
 lllllllllllllll   lllllllllllllll  Kernel: 10.0.22622.0
 lllllllllllllll   lllllllllllllll  Motherboard: Parallels ARM Virtual Machine Parallels ARM Virtual Platform
 lllllllllllllll   lllllllllllllll  Uptime: 10 days 23 hours 27 minutes
                                    Packages: (none)
 lllllllllllllll   lllllllllllllll  Shell: PowerShell v7.2.6
Add-Type: C:\Users\zhang\winfetch.ps1:619
Line |llllllllll   lllllllllllllll
 619 |      Add-Type -AssemblyName System.Windows.Forms
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path 'C:\Users\zhang\System.Windows.Forms.dll' because it does not exist.
 lllllllllllllll   lllllllllllllll
InvalidOperation: C:\Users\zhang\winfetch.ps1:620
Line |
 620 |  … displays = foreach ($monitor in [System.Windows.Forms.Screen]::AllScr …
     |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Unable to find type [System.Windows.Forms.Screen].

                                    Resolution
                                    Terminal: Windows Terminal
InvalidArgument: C:\Users\zhang\winfetch.ps1:696
Line |
 696 |      $cpufreq = [math]::round((([int]$cpu.MaxClockSpeed)/1000), 2)
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot convert the "System.Object[]" value of type "System.Object[]" to type "System.Int32".

                                    CPU: Apple Silicon Apple Silicon Apple Silicon Apple Silicon @ GHz
                                    GPU: Parallels Display Adapter (WDDM)
                                    Memory: 2.87 GiB / 5.99 GiB (47%)
                                    Disk (C:): 54 GiB / 255 GiB (21%)

Notably:

  1. Cannot find path 'C:\Users\zhang\System.Windows.Forms.dll' because it does not exist.
  2. Unable to find type [System.Windows.Forms.Screen].
  3. Cannot convert the "System.Object[]" value of type "System.Object[]" to type "System.Int32".

In addition: I have 22622.575 installed instead of 22622.0

CarterLi avatar Aug 22 '22 03:08 CarterLi