博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
sysinternals_批处理脚本以自动更新Sysinternals工具
阅读量:2514 次
发布时间:2019-05-11

本文共 2690 字,大约阅读时间需要 8 分钟。

sysinternals

sysinternals

While the Microsoft Sysinternals tools are incredibly powerful and useful, the one feature they lack is the ability to check for new versions. Currently, you have to periodically check the Sysinternals site and compare versions between your system and the most recent official release in order to stay up to date.

尽管Microsoft Sysinternals工具功能强大且实用,但是它们缺少的一项功能是能够检查新版本。 当前,您必须定期检查Sysinternals站点并比较系统和最新正式发行版之间的版本,以保持最新状态。

As a better solution, we have created a batch script which will automatically update the Sysinternals tools you have on your system. All you have to do is put the batch script file into the folder where your Sysinternals tools are located and the script does the rest, no configuration is needed.

作为更好的解决方案,我们创建了一个批处理脚本,该脚本将自动更新您系统上的Sysinternals工具。 您所要做的只是将批处理脚本文件放入Sysinternals工具所在的文件夹中,其余部分由脚本执行,无需进行配置。

Here is how it works:

下面是它的工作原理:

  • The current list of tools from Sysinternals is downloaded and compared to the files on your system.

    Sysinternals的当前工具列表已下载,并与系统上的文件进行比较。
  • If a match is found, the current version from Sysinternals is copied to your system.

    如果找到匹配项,则会将Sysinternals中的当前版本复制到您的系统中。
  • If a tool is currently running, it is closed and then restarted once the script completes.

    如果当前正在运行工具,则在脚本完成后将其关闭,然后重新启动。

剧本 (The Script)

@ECHO OFFTITLE Sysinternals UpdaterECHO Sysintenals UpdaterECHO Written by: Jason FaulknerECHO SysadminGeek.comECHO.ECHO.SETLOCAL ENABLEDELAYEDEXPANSIONSET SysInternalsTools="%Temp%SysInternalsTools.tmp.txt"SET CurrentTasks="%Temp%CurrentTasks.tmp.txt"SET StartWhenFinished="%Temp%StartWhenFinished.tmp.txt"ECHO Detected directory: %~dp0%~d0CD %~p0ECHO.ECHO.ECHO Downloading current tool list...SET LiveShare=\live.sysinternals.comtoolsSTART /MIN %LiveShare%DIR %LiveShare% /B > %SysInternalsTools%TASKLIST > %CurrentTasks%ECHO ;Terminated tools > %StartWhenFinished%ECHO.ECHO Updating installed SysInternals toolsFOR /F %%A IN ('DIR /B') DO (   FOR /F "usebackq" %%B IN (%SysInternalsTools%) DO (      IF /I [%%A]==[%%B] (         ECHO Updating %%A         FOR /F "usebackq" %%C IN (%CurrentTasks%) DO (            IF /I [%%A]==[%%C] (               ECHO %%C is currently running, killing process - queue restart               ECHO %%C >> %StartWhenFinished%               TASKKILL /IM %%A /T /F            )         )         XCOPY %LiveShare%%%B %%A /Y         ECHO.      )   ))ECHO.ECHO Resuming killed tasksFOR /F "usebackq skip=1" %%A IN (%StartWhenFinished%) DO (   ECHO Starting %%A   START "Sysinternals Tool" "%%A")IF EXIST %SysInternalsTools% DEL %SysInternalsTools%IF EXIST %CurrentTasks% DEL %CurrentTasks%IF EXIST %StartWhenFinished% DEL %StartWhenFinished%ENDLOCALECHO.PAUSE

链接 (Links)

翻译自:

sysinternals

转载地址:http://aoywd.baihongyu.com/

你可能感兴趣的文章
python 基本语法
查看>>
Swift - 点击箭头旋转
查看>>
git配置
查看>>
【hexo】01安装
查看>>
CI框架源码学习笔记2——Common.php
查看>>
005---书籍添加和编辑的提交数据
查看>>
使用case语句给字体改变颜色
查看>>
JAVA基础-多线程
查看>>
面试题5:字符串替换空格
查看>>
JSP九大内置对象及四个作用域
查看>>
ConnectionString 属性尚未初始化
查看>>
数据结构-栈 C和C++的实现
查看>>
MySQL基本命令和常用数据库对象
查看>>
poj 1222 EXTENDED LIGHTS OUT(位运算+枚举)
查看>>
进程和线程概念及原理
查看>>
Lucene、ES好文章
查看>>
android 生命周期
查看>>
jquery--this
查看>>
MySQL 5.1参考手册
查看>>
TensorFlow安装流程(GPU加速)
查看>>