1

依存関係が欠落している EXE がバッチ内から実行されたときにエラーをキャッチできますか? このような場合、EXE の読み込みに失敗し、アプリのログが空になります。

エラーレベルをチェックしようとし、depends.exeツールを使用してEXEを事前チェックしようとしましたが、どれも機能しませんでした

つまり、mybat.exe

run-this-app.exe いくつかのチェックを行います..何かをします

4

1 に答える 1

0

依存関係とその場所がわかっていると仮定すると、それらを確認できます。

if not exist "%windir%\system32\dependency1" goto :msg
if not exist "%windir%\system32\dependency2" goto :msg
if not exist "%windir%\system32\dependency3" goto :msg
if not exist "%windir%\system32\dependency4" goto :msg

:: batch code here

goto :EOF    
:msg
echo you need the extra xyz filez...
于 2013-12-11T23:43:04.283 に答える