GithubHelp home page GithubHelp logo

updatehostsforwindows's Introduction

Update hosts for windows

About project

The purpose of the project is to provide a double-click-and-done way to update hosts for Windows easily. This project doesn't maintain hosts itself, ONLY downloads hosts file from racaljk/hosts and copy to the right place.

Requirements

The project requires Windows PowerShell.

Bugs

Though tested only on Windows7, it's expected to be run on Windows7, Windows8 or higher. Any questions or feedbacks are appreciated.

Why Windows

Because updating hosts for Linux is so easy that it cannot even be called as a project.

How does the script work

I'm so glad you reached here, that's the spirit of engineer.

Actually it's a mess. PowerShell scripts (or .ps1) can do downloading and copying tasks, but it cannot be activated by double-click as any other executable programmes, moreover, to run a ps1 script requires "Unrestricted or RemoteSigned ExecutionPolicy", otherwise execution is denied. There are ways to bypass such policy, such as passing "-ExecutionPolicy unrestricted" flags to PowerShell. So the batch file acts as a wrapper, to generate ps1 script and call PowerShell with specific flags.

updatehostsforwindows's People

Contributors

liutgnu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.