win7下一些常用的配置脚本命令

::任务计划每周二4点重启

schtasks /create /ru "system" /tn restart /tr "shutdown.exe -r" /sc weekly /d TUE /st 04:00 /f

::删除任务计划
schtasks /delete /tn restart /f
::IP设置为固定IP
netsh interface ip set address "本地连接" static 192.168.1.8 255.255.255.0 192.168.1.1
::DNS
netsh interface ip set dns "本地连接" static 192.168.1.1 primary
::IP设置为动态IP
netsh interface ip set address "本地连接" source=dhcp
::DNS
netsh interface ip set dns "本地连接" source=dhcp
::系统异常重启不启动修复
bcdedit /set {default} bootstatuspolicy ignoreallfailures
bcdedit /set {current} recoveryenabled No
::系统异常重启启动修复
bcdedit /set {default} bootstatuspolicy displayallfailures
::关闭windows防火墙
netsh advfirewall set publicprofile state off
netsh advfirewall set privateprofile state off
::启动windows防火墙
netsh advfirewall set publicprofile state on
netsh advfirewall set privateprofile state on
::关闭自动更新
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t reg_dword /d 1 /f
::打开自动更新
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t reg_dword /d 4 /f
::电源选项-显示器关闭时间
powercfg /change monitor-timeout-ac 0
::电源选项-硬盘关闭时间
powercfg /change disk-timeout-ac 0
::电源选项-睡眠时间
powercfg /change standby-timeout-ac 0
::电源选项-休眠时间
powercfg /change hibernate-timeout-ac 0
::关闭UAC
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorAdmin /t reg_dword /d 0 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t reg_dword /d 0 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v PromptOnSecureDesktop /t reg_dword /d 0 /f
::开启UAC
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorAdmin /t reg_dword /d 5 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t reg_dword /d 1 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v PromptOnSecureDesktop /t reg_dword /d 1 /f

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值