Socket
Socket
Sign inDemoInstall

specs_window

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

specs_window

It is a NodeJS module to get hardware informacions.


Version published
Weekly downloads
9
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

Specs for Windows 🪟:

Installation:

It is a NodeJS module to get hardware informacions.

npm install specs_window

Project info:

  • author: Riseghost 👻
  • languague: C/C++
  • platform support: Windows 🪟
  • github: https://github.com/RiseGhost/specs_window
  • npm profil: https://www.npmjs.com/~riseghost

Features:

  • Get CPU Thread number;
  • Get PC Name (Host Name);
  • Get CPU Architecture ⚠️;
  • Get Total RAM Memory install;
  • Get Free RAM Memory;
  • Get Available Drives (Units: C:\, G:\, F:\, ...);
  • Get Size Drives;
  • Get Processes;
  • Get Cursor/Mouse position;
  • Move Cursor/Mouse;
  • Get Screen Size

Get CPU Threads number 🧠:

const specs = require('specs_window')

console.log(specs.getProcessorsNumber())

Get PC Name (Host Name) 🖥️:

const specs = require('specs_window')

console.log(specs.getPCName())

Get CPU Architecture ⚠️:

This func is under maintenance.

const specs = require('specs_window')

console.log(specs.getProcessorArchitecture())

Get Total RAM Memory install 🗄️:

There are two func to get the Total Memory:

  • getTotalMemory()
  • getTotalMemoryGB()
getTotalMemory():
const specs = require('specs_window')

console.log(specs.getTotalMemory())

The fist func, getTotalMemory, return the following object:

{
  Bytes: 17041244160,
  KiloBytes: 16641840,
  MegaBytes: 16251.796875,
  GigaBytes: 15.870895385742188
}
getTotalMemoryGB():
const specs = require('specs_window')

console.log(specs.getTotalMemoryGB())

The second func, getTotalMemoryGB, return just GB:

15.870895385742188

Get Free RAM Memory 🗄️🆓:

There are two func to get the Free Memory:

  • getFreeMemory()
  • getFreeMemoryGB()
getFreeMemory():
const specs = require('specs_window')

console.log(specs.getFreeMemory())

The first func, getFreeMemory, return the following object:

{
  Bytes: 3957870592,
  KiloBytes: 3865108,
  MegaBytes: 3774.51953125,
  GigaBytes: 3.686054229736328
}
getFreeMemoryGB():
const specs = require('specs_window')

console.log(specs.getFreeMemoryGB())

The second func, getFreeMemoryGB, return just GB:

3.686054229736328

Get Available Drive ☑️💿:

This func return all available drive path, include:

  • Internal drives:
    • Hard disk;
    • SSD
  • External drives:
    • pendrives;
    • external disk (HD or SSD)
    • ...

Does not work with smarphones, tables, nintendo switch, ...

const specs = require('specs_window')

console.log(specs.getAvailableDrives())
[ 'C:\\', 'G:\\' ]

Get Size Drives 🗄️💿:

This func return the Free Memory and Full Memory of Path Drive.

Path Dive is for exemple:

  • C:\\
  • G:\\
  • F:\\
  • ....

This func can you recive a individual Path Drive or a array with many Path Drive.

const specs = require('specs_window')

const Drives = specs.getAvailableDrives()

console.log(specs.getSizeDrives(Drives))
[
  { FreeMemory: 9531, FullMemory: 425668.99609375 },
  { FreeMemory: -1, FullMemory: -1 }
]

If the func can´t read a Memory of Drive return -1.

Get Processes 🌀:

This func return a array with all process running in machine.

const specs = require('specs_window')

Object.values(specs.getProcesses()).forEach((Processe) => {
  console.log(Processe)
})

//or:
console.log(specs.getProcesses())
{
  PID: 23060,
  Name: 'Code.exe',
  MemoryCommit: 26976,
  MemoryWorkingSet: 91436
}
{
  PID: 46872,
  Name: 'firefox.exe',
  MemoryCommit: 171060,
  MemoryWorkingSet: 212420
}
{
  PID: 85324,
  Name: 'firefox.exe',
  MemoryCommit: 26820,
  MemoryWorkingSet: 29392
}

If doesn´t get the Processe Memory, return -1.

Get Cursor/Mouse position 🐁🗺️:

Return the mouse position in the screen not in the window.

const specs = require('specs_window')

console.log(specs.getMousePos())
{ X: 1642, Y: 847 }

Move Cursor/Mouse 🐁➡️:

Yes, you can move de Cursor/Mouse.

const specs = require('specs_window')

specs.MoveMouse(500,900)

Get Screen Size 📺📐:

Return the Screen Size in pixeis.

const specs = require('specs_window')

console.log(specs.getScreenSize())
{ width: 1920, height: 1080 }

Keywords

FAQs

Package last updated on 04 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc