Socket
Book a DemoInstallSign in
Socket

@avinashtare/env_path

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@avinashtare/env_path

The env_path middleware is a powerful tool designed to streamline the management of the Windows system environment path. It empowers users to easily control, modify, and enhance their environment variables, providing a seamless experience for developers a

1.0.1
latest
npmnpm
Version published
Maintainers
1
Created
Source

Env_Path

A Node.js module for managing the only windows system environment variable PATH. The env_path middleware is a powerful tool designed to streamline the management of the Windows system environment path. It empowers users to easily control, modify, and enhance their environment variables, providing a seamless experience for developers and system administrators.

Install

npm install @avinashtare/env_path

warning

  • This Package Only Work On Windows System.
  • You Also Run Your Code On Administration

how to get All Env Variables

import env_path from "@avinashtare/env_path";

console.log(env_path.getAll())

Add Path Environment Variables

import env_path from "@avinashtare/env_path";

async function addPath(newPath){
    let isUpdated = await env_path.addPath(newPath)
    if(isUpdated){
        console.log("Your Path Hass Been Added")
    }
    else{
        console.log("Fail To Update Path")
    }
}
let addNewPath = "E:\\Users\\Public\\Music";
addPath(addNewPath);

Replace Path Environment Variables

// replace path 
async function replacePath(oldPath,newPath){
    let isUpdated = await env_path.replacePath(oldPath,newPath)
    if(isUpdated){
        console.log("You Path hass been replaced")
    }
    else{
        console.log("Fail To replaced Path")
    }
}
let addOldPath = "E:\\Users\\Public\\Music";
let addNewPaths = "E:\\Users\\Public\\New";
replacePath(addOldPath,addNewPaths);

Remove Path Environment Variables

// replace path 
// remove path 
async function removePath(removePath){
    let isUpdated = await env_path.removePath(removePath)
    if(isUpdated){
        console.log("Your Path removed")
    }
    else{
        console.log("Fail To removed Path")
    }
}
let removeOldPath = "E:\\Users\\Public\\Music";

License

License This project is released under the MIT License.

Contact

avinashtare.work@gmail.com

Author

卐🕉 Avinash Tare 🕉 卐

Keywords

paths

FAQs

Package last updated on 09 Dec 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.