Last active
September 4, 2017 06:24
-
-
Save neetsdkasu/9258425 to your computer and use it in GitHub Desktop.
MSEでコマンドラインからファイルをウィルススキャンする。(simply batch to scan file by MSE(Microsoft Security Essential) on command prompt.)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@rem scanfile.bat | |
@rem MSEでコマンドラインからファイルをスキャンする | |
@rem 環境変数PATHの通った適当なディレクトリにこのファイルを設置して使う | |
@if "%~1"=="" goto usagelabel | |
@if /I "%~1"=="-p" goto pauselabel | |
@if /I "%~1"=="/p" goto pauselabel | |
@if not exist "%~1" goto usagelabel | |
"C:\Program Files\Microsoft Security Client\MpCmdRun.exe" -Scan -ScanType 3 -File "%~f1" | |
@exit /b | |
:pauselabel | |
@call "%~f0" "%~2" | |
@pause | |
@exit /b | |
:usagelabel | |
@echo scanfile.bat | |
@echo 説明: | |
@echo MSEでファイル(またはディレクトリ)をスキャンする | |
@echo usage: scanfile ^<path^> | |
@echo usage: scanfile -p ^<path^> | |
@echo -p スキャン後 pause を実行する |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
直ぐに終了されても困る。