mixu / archey.js

Archey.js is a system information tool written in JS (based on Archey)
29 stars 11 forks source link

Disk and Resolution incorrect on Windows #3

Closed m-wild closed 10 years ago

m-wild commented 10 years ago

Windows 8.1 x64

The disk issue seems to be a parsing problem. The command run to get screen resolution just doesn't pass the res back.

C:\Users\Michael
λ archeyjs
        ,.=:!!t3Z3z.,                User: Michael
       :tt:::tt333EE3                Hostname: PUMBAA
       Et:::ztt33EEEL @Ee.,      .., OS: Microsoft Windows 8.1 Pro
      ;tt:::tt333EE7 ;EEEEEEttttt33# Kernel: 6.3.9600 x64
     :Et:::zt333EEQ. $EEEEEttttt33QL Uptime: 2 hours
     it::::tt333EEF @EEEEEEttttt33F  Window Manager: DWM
    ;3=*^```"*4EEV :EEEEEEttttt33@.  Desktop Environment: Aero
    ,.=::::!t=., ` @EEEEEEtttz33QF   Terminal: cygwin
   ;::::::::zt33)   "4EEEtttji3P*    CPU: Intel i7-4770K CPU @ 3.50GHz
  :t::::::::tt33.:Z3z..  `` ,..g.    Resolution: x
  i::::::::zt33F AEEEtttt::::ztF     RAM: 3.24gb / 7.94gb
 ;:::::::::t33V ;EEEttttt::::t3      Disk: undefinedNaNb / NaNb
 E::::::::zt33L @EEEtttt::::z3F
{3=*^```"*4E3) ;EEEtttt:::::tZ`
             ` :EEEEtttt::::z7
                 "VEzjt:;;z>*`

C:\Users\Michael
λ wmic logicaldisk get DeviceId,FreeSpace,Size
DeviceID  FreeSpace     Size
C:        177098211328  249504460800
D:
E:
F:        575976910848  1000068870144
G:        931637874688  2000263573504
H:        687797690368  2000263573504

C:\Users\Michael
λ wmic desktopmonitor get screenwidth
ScreenWidth

C:\Users\Michael
λ wmic desktopmonitor get screenheight
ScreenHeight

capture

mixu commented 10 years ago

looks like you're inside cygwin?

Could you try this out: http://superuser.com/questions/270718/get-display-resolution-from-windows-command-line

e.g. cmd /c wmic desktopmonitor get screenheight

edit: another thing might be wmic desktopmonitor which shows the full info for the desktopmonitor. Sadly I don't have a Win8.1 install to test on.

m-wild commented 10 years ago

im using cmder

C:\Users\Michael
λ cmd /c wmic desktopmonitor get screenheight, screenwidth
ScreenHeight  ScreenWidth

the result is the same in cmd.exe though

C:\Users\Michael>wmic desktopmonitor get screenheight, screenwidth
ScreenHeight  ScreenWidth

C:\Users\Michael>archeyjs
        ,.=:!!t3Z3z.,                User: Michael
       :tt:::tt333EE3                Hostname: PUMBAA
       Et:::ztt33EEEL @Ee.,      .., OS: Microsoft Windows 8.1 Pro
      ;tt:::tt333EE7 ;EEEEEEttttt33# Kernel: 6.3.9600 x64
     :Et:::zt333EEQ. $EEEEEttttt33QL Uptime: 9 hours
     it::::tt333EEF @EEEEEEttttt33F  Window Manager: DWM
    ;3=*^```"*4EEV :EEEEEEttttt33@.  Desktop Environment: Aero
    ,.=::::!t=., ` @EEEEEEtttz33QF   CPU: Intel i7-4770K CPU @ 3.50GHz
   ;::::::::zt33)   "4EEEtttji3P*    Resolution: x
  :t::::::::tt33.:Z3z..  `` ,..g.    RAM: 3.19gb / 7.94gb
  i::::::::zt33F AEEEtttt::::ztF     Disk: undefinedNaNb / NaNb
 ;:::::::::t33V ;EEEttttt::::t3
 E::::::::zt33L @EEEtttt::::z3F
{3=*^```"*4E3) ;EEEtttt:::::tZ`
             ` :EEEEtttt::::z7
                 "VEzjt:;;z>*`

C:\Users\Michael>
mixu commented 10 years ago

ok, thanks. I guess I'll patch archey up so that it won't show that line if it can't parse the return values as a number. I've tried to find a more generic solution it seems wmic is the best one can do in terms of standard builtin tools for fetching this kind of info on Windows.

m-wild commented 10 years ago

according to stackoverflow.com/questions/25594848 you have to use a different wmic command. This works for me

wmic path Win32_VideoController get CurrentHorizontalResolution,CurrentVerticalResolution
CurrentHorizontalResolution  CurrentVerticalResolution
1920                         1080