返回顶部

bat脚本静默安装软件示例

@echo off

rem 设置共享路径名和执行文件名
set "Route=\\dc1\netlogon"
set "EDR_EXE=edr_installer_192.168.2.221_443.exe"


rem  不可修改
set "ProcessFlag=edr_monitor.exe"
tasklist | findstr /IM %ProcessFlag%
if %errorlevel% == 0 (
	exit /b 0
)
  
rem copy  /Y "%Route%\%EDR_EXE%"  %windir%\Temp\

start /MIN "" %Route%\%EDR_EXE% -Silence=Y
if %errorlevel% == 0 (
	echo >%windir%\Temp\flag.log
	exit /b 0
) 

exit /b 0

  

posted @ 2020-06-10 14:03  御用闲人  阅读(449)  评论(0编辑  收藏