I have a vbscript that uses a WScript.Shell instance and .Run("ffmpeg.exe -params",,True) to fire off a ffmpeg video conversion.

When the conversion is complete, the cmd.exe window stays open at a typical prompt, and i was curious if it is possible to auto-close that child cmd window when it's done doing whatever it's doing.

Thanks.

Mark

Well first off, how would you tell if this program is done? If you know the answer to that, switch your code to ShellExecute API and WaitForSingleObject API...

Good Luck

So i solved my problem by writing out the "ffmpeg.exe -params" to a batch file and using WScript.Shell .Run to execute the batch file.

Works like a charm.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.