Git Product home page Git Product logo

autostart's Introduction

AutoStart

  1. 该工具提供延迟执行程序功能,支持开机自启。
  2. 提供基础执行程序方式。
  3. 提供指定用户执行程序,例如以管理员权限执行。

配置文件

[
  {
    "mode": 1,              // 基础方式
    "wait": true,           // 等待子程序
    "name": "notepad.exe",  // 为程序名时会从环境变量里寻找,可指定绝对路径
    "argv": "c:\\1.txt",    // 命令行参数,空格和转义按照需要填写
    "env": [                // 附带环境变量
      "OS=Windows",
      "ARCH=amd64"
    ],
    "dir": "C:\\",            // 运行的起始目录
    "stdin": "C:\\in.txt",    // 标准输入,为文件则时文件内容,否则为字符串输入
    "stdout": "C:\\out.txt",  // 标准输出,不是文件则使用默认标准输出
    "stderr": "C:\\err.txt",  // 标准错误,不是文件则使用默认标准错误
    "delay": 1,               // 延迟运行秒数
    "hide": false             // 隐藏窗口
  },
  {
    "mode": 2,                // 使用lsrunase.exe方式运行
    "user": "administrator",  // 用户名,填这个一般为管理员权限运行
    "password": "7Ft9hvgH7bvLibW3XQ==", // 密码,使用LSencrypt.exe进行加密
    "domain": "Mydomain",               // 域
    "command": "notepad.exe c:\\2.txt", // 命令行参数,包含可执行程序
    "runpath": "c:\\",                  // 运行起始目录
    "delay": 2,                         // 延迟运行秒数
    "hide": false                       // 隐藏窗口
  }
]

使用方法

  1. 执行.\AutoStart.exe -reg add -c C:\config.json可以设置开机启动。
  2. 执行.\AutoStart.exe -reg del可以取消开机启动。
  3. 执行.\AutoStart.exe -c C:\config.json可以测试运行结果。

autostart's People

Contributors

ovler-young 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.