I need to test automatically if an executable has no missing dll at starting. This checking is done with Jenkins (continuous integration) which can execute batch scripts.
Despite all my tests, I can't find a way with a batch script to start an executable and get an error code if there is one or more missing dll.
It works fine with "CALL myexecutable.exe" which returns a code different from 0 when a dll is missing(-1073741515) but, obviously, I need to stop the program manually.
I tried lots of things with the command "START" by mixing several batch scripts (one which do the CALL and the other which kill the process of the executable after a sleep of few seconds, ect...) but the only way I found to have a code different from 0 when there is missing dll is with "CALL myexecutable.exe"...
EDIT : Actually, to simplify, I search a way to detect that an exe started from a batch file failed at start (but for the moment, I didn't find a way to close the program automatically because when a dll is missing, a dialog box with an error message appears). I don't care to know which dll is involved. In my case, I can do the assumption that if the program failed at start, the reason is a missing dll.
Someone have an idea to help me ?