zoukankan      html  css  js  c++  java
  • bat脚本总结

    1.修改密码

    @echo off
    set /p b=请输入新密码:
    net user %username% %b%
    echo 密码修改成功 %b% 请牢记你的密码
    pause
    

      

    2.删除hosts文件并添加环境变量

    mkdir C:PythonLog
    
    move C:python27.dll C:WindowsSystem32
    
    del C:WindowsSystem32driversetchosts
    move C:hosts  C:WindowsSystem32driversetc
    
    
    @echo off
    
    set My_PATH=C:Python27
     
    set PATH=%PATH%;%My_PATH%
    reg add "HKLMSYSTEMCurrentControlSetControlSession ManagerEnvironment" /v "Path" /t REG_EXPAND_SZ /d "%PATH%" /f
    
    @echo off
    
    set My_PATH=C:Python27Scripts
     
    set PATH=%PATH%;%My_PATH%
    reg add "HKLMSYSTEMCurrentControlSetControlSession ManagerEnvironment" /v "Path" /t REG_EXPAND_SZ /d "%PATH%" /f
    
    
    taskkill /im explorer.exe /f
    start explorer.exe

    3.启动当前文件夹下的python脚本

    tart cmd /K "cd  %~dp0 &&python rank_script/redis_elk_yes_main.py"
    start cmd /K "cd  %~dp0 &&python rank_script/redis_elk_no_time_main.py"
    start cmd /K "cd  %~dp0 &&python proxy_script/proxy_list.py"
    start cmd /K "cd  %~dp0 &&python kafka_mysql/topic_keyword/kafaka2mysql_keyword.py"
    

      

  • 相关阅读:
    字典常用操作复习
    列表常用方法复习
    爬虫流程复习
    协程解决素数
    yield 复习
    多线程复习2
    多线程复习1
    异常 巩固3
    logging日志基础示例
    2019最新百度网盘不限速下载教程
  • 原文地址:https://www.cnblogs.com/xiao-xue-di/p/13353696.html
Copyright © 2011-2022 走看看