且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

启动时运行批处理文件

更新时间:2023-01-30 10:54:21

我在 Win7 中遇到了同样的问题,关于在启动时运行脚本 (.bat)(当计算机启动时与有人登录时)会修改网络参数使用netsh.最终对我有用的是以下内容:

I had the same issue in Win7 regarding running a script (.bat) at startup (When the computer boots vs when someone logs in) that would modify the network parameters using netsh. What ended up working for me was the following:

  1. 使用管理员帐户登录
  2. 点击开始并输入任务计划程序"并回车
  3. 点击任务计划程序库"
  4. 点击屏幕右侧的新建任务",设置参数如下:

  1. Log in with an Administrator account
  2. Click on start and type "Task Scheduler" and hit return
  3. Click on "Task Scheduler Library"
  4. Click on "Create New Task" on the right hand side of the screen and set the parameters as follows:

一个.将用户帐户设置为 SYSTEM

a. Set the user account to SYSTEM

B.选择以最高权限运行"

b. Choose "Run with highest privileges"

c.选择适用于 Windows7 的操作系统

c. Choose the OS for Windows7