@echo off
SETLOCAL enabledelayedexpansion
REM ### Winodws7,Windows10共用
REM ###
REM ### AutoInstall_StartUp.bat
REM ###
REM ### OS再起動時にStartUpからセキュリティpatch適用自動化ツールを起動するbatchファイル)
REM ###
REM ### reboot後のログイン時に、本batch起動から30秒sleepさせてからフルパスで
REM ### AutoInstall.batを起動する。
REM ###

REM ###
REM ### ファイルを格納するフォルダ
REM ###
set DIR_LOG=C:\DKC200\others\mssp\log\

REM ###
REM ### 実行ログファイル
REM ###
set AUTOINSTALL_LOG=%DIR_LOG%AutoInstall_log.txt

REM ###
REM ### メッセージ設定
REM ###
set MSG-INI-015-I="MSG-INI-015-I-Security Patch Installation Tool starts after 30 seconds. Please do not perform many operations."
set MSG-INI-043-I="MSG-INI-043-I-##### Start AutoInstall_StartUp.bat #####"
set MSG-COM-009-E="MSG-COM-009-E-[Error] A required file can not be found."
set MSG-COM-010-I="MSG-COM-010-I-[Start] Start Windows event log collection."
set MSG-COM-011-I="MSG-COM-011-I-[Collection SUCCESS] Windows event log collection succeeded."
set MSG-COM-012-E="MSG-COM-012-E-[Collection FAILED] Windows event log collection failed."
set MSG-COM-013-I="MSG-COM-013-I-Delete Windows event log."
set MSG-COM-014-I="MSG-COM-014-I-Collect Windows Application event log files."
set MSG-COM-015-I="MSG-COM-015-I-Collect Windows Setup event log file."
set MSG-COM-016-I="MSG-COM-016-I-Collect Windows System event log file."
set MSG-COM-017-E="MSG-COM-017-E-Failed to collect Windows event log file."
set MSG-COM-018-E="MSG-COM-018-E-Failed to start Log_Collection.bat."
set MSG-COM-019-E="MSG-COM-019-E-An error occurred in Log_Collection.bat."
set MSG-COM-021-I="MSG-COM-021-I-##### Start Log_Collection.bat #####"

REM ###
REM ### コンソール出力制御フラグ
REM ###
set CONSOLE_OFF=0
set CONSOLE_ON=1

REM ### 30秒後にセキュリティPatch適用自動化ツールを開始
call :LOG_OUT %MSG-INI-043-I% %CONSOLE_OFF%
call :LOG_OUT %MSG-INI-015-I% %CONSOLE_ON%

REM ### 30秒停止
timeout /t 30 > nul

REM ###
REM ### セキュリティpatch適用自動化ツール実行
REM ### このコメント以降の処理は、AutoInstall.bat内で作成する。
REM ###
