zoukankan      html  css  js  c++  java
  • 西门子解除重启提示批处理

    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :: 删除注册表.... ::
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    @echo off
    CLS
    ECHO.
    ECHO ================================
    ECHO 正在获取批处理文件管理员权限
    ECHO ================================
    :init
    setlocal DisableDelayedExpansion
    set "batchPath=%~0"
    for %%k in (%0) do set batchName=%%~nk
    set "vbsGetPrivileges=%temp%OEgetPriv_%batchName%.vbs"
    setlocal EnableDelayedExpansion
    :checkPrivileges
    NET FILE 1>NUL 2>NUL
    if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
    :getPrivileges
    if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges)
    ECHO.
    ECHO ********************************
    ECHO 请求 UAC 权限批准……
    ECHO ********************************
    ECHO Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%"
    ECHO args = "ELEV " >> "%vbsGetPrivileges%"
    ECHO For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%"
    ECHO args = args ^& strArg ^& " " >> "%vbsGetPrivileges%"
    ECHO Next >> "%vbsGetPrivileges%"
    ECHO UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%"
    "%SystemRoot%System32WScript.exe" "%vbsGetPrivileges%" %*
    exit /B
    :gotPrivileges
    setlocal & pushd .
    cd /d %~dp0
    if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1)
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :: 删除注册表.... ::
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    rem 本行以下可修改为你需要的bat命令(从上面三行冒号开始到下面都可删改)
    ECHO 正在删除注册表....
    ECHO.


    reg delete "HKEY_LOCAL_MACHINEsystemControlSet001ControlSession Manager" /v "PendingFileRenameOperations" /f
    reg delete "HKEY_LOCAL_MACHINEsystemCurrentControlSetControlSession Manager" /v "PendingFileRenameOperations" /f
    reg delete "HKEY_LOCAL_MACHINEsystemControlSet002ControlSession Manager" /v "PendingFileRenameOperations" /f
    pause

  • 相关阅读:
    sublime text 3 常用快捷键
    PHP注释-----PHPDOC
    正则表达式
    JavaScript中常用的函数
    网站特效离不开脚本,javascript是最常用的脚本语言,我们归纳一下常用的基础函数和语法:
    ubuntu16.04LTS下安装zookeeper
    HiveQL详解
    ubuntu16.04LTS下安装hive-2.1.0
    Hadoop环境 IDE配置(在eclipse中安装hadoop-eclipse-plugin-2.7.3.jar插件)
    Hadoop 数据节点DataNode异常
  • 原文地址:https://www.cnblogs.com/baoku/p/13947554.html
Copyright © 2011-2022 走看看