Prevent batch file from displaying a DOS window

(imported topic written by Don65)

We have a batch file that we want to deploy / run via a custom action. Is there a way to prevent a DOS window from popping up on the screen. I can redirect the output of the batch file to the end user doesn’t see what’s happening, however am unable to hide the DOS window. We’re currently using BES 5.1.

Thanks in advance for any assistance.

(imported comment written by Marjan23)

Hi Don,

Try:

waithidden cmd.exe /c filename.bat

inside your bigfix action script.

(imported comment written by BenKus)

Hey Don,

Note that Marjan solution requires BES 6.0 Clients. “waithidden” and “runhidden” were introduced in BES 6.0.

Ben

(imported comment written by Doug_Coburn)

Alot of the times when you use dos commands or batch files if you redirect the output to null you can keep the windows from showing up. This does not work for all programs. Such as doing a net stop or net start will still open up a dos prompt.

Example:

dos mkdir “drive:\path\folder” > NUL 2>NUL

This will work in 5.1 or 6.0

Doug

(imported comment written by SystemAdmin)

Have you tried using waitdetached? I’ve tested it a bit this morning and it seems to keep the DOS window from popping up. Of course I don’t know what your batch file is trying to do specifically, and that can cause different behaviour.

Jim