How to suppress the DOS window when executing a command?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
ooe8eoo

How to suppress the DOS window when executing a command?

Post by ooe8eoo »

Hi,

I am executing the convert command from another Windows application.

The black DOS window will appear whenever the command is executing. Is there a way to suppress the window?
Albireo
Posts: 68
Joined: 2010-01-12T03:32:23-07:00
Authentication code: 8675309

Re: How to suppress the DOS window when executing a command?

Post by Albireo »

ooe8eoo wrote:Hi,

I am executing the convert command from another Windows application.

The black DOS window will appear whenever the command is executing. Is there a way to suppress the window?
What Windows application?

//Jan
ooe8eoo

Re: How to suppress the DOS window when executing a command?

Post by ooe8eoo »

It is a commercial digital asset management application.

It allows a single line command to be used for processing the images.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to suppress the DOS window when executing a command?

Post by magick »

Suppressing the command window is an option when a Windows program is built. Once a program is compiled with the command window option enabled, we do not believe there is a way to suppress it. The ImageMagick Windows distribution includes a version of convert that suppresses the command windows at run time.
ooe8eoo

Re: How to suppress the DOS window when executing a command?

Post by ooe8eoo »

magick wrote:The ImageMagick Windows distribution includes a version of convert that suppresses the command windows at run time.
Hi magick,

Do you mean that by using this distribution, the command window could be suppressed even if the command is executed from that commercial application?

If this is the case, I would appreciate if you could show me the link to that Windows distribution.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to suppress the DOS window when executing a command?

Post by magick »

See http://www.imagemagick.org/script/binar ... hp#windows. We don't know anything about the commercial application. However, we built the ImageMagick Windows distribution and we support it and the convert program runs without displaying the command window.
ooe8eoo

Re: How to suppress the DOS window when executing a command?

Post by ooe8eoo »

Just realised that these are the same Windows distributions that I have used for testing.

So I suppose the only solution is to make a suggestion to the commercial application developer.
jpiquemal
Posts: 54
Joined: 2003-12-07T01:57:19-07:00

Re: How to suppress the DOS window when executing a command?

Post by jpiquemal »

Hello
Do you use CreateProcess to launch convert.exe ?
If yes, set wShowWindow to SW_HIDE.
ooe8eoo

Re: How to suppress the DOS window when executing a command?

Post by ooe8eoo »

Hi jpiquemal,

I suppose CreateProcess is a programming code function?

No, convert.exe is launched from the application just by typing the commands and path. The input and output image path/filename are replaced by two variables $INPUT and $OUTPUT.
jpiquemal
Posts: 54
Joined: 2003-12-07T01:57:19-07:00

Re: How to suppress the DOS window when executing a command?

Post by jpiquemal »

But how do you call convert.exe ?
ooe8eoo

Re: How to suppress the DOS window when executing a command?

Post by ooe8eoo »

I am not sure whether I understand your question correctly....

This is a commercial application I purchased. I do not know how convert.exe is called by the programme. As a user, I just need to fill in the command and path in a line box e.g. "C:\Program Files\ImageMagick\convert.exe" $INPUT $OUTPUT.jpg
jpiquemal
Posts: 54
Joined: 2003-12-07T01:57:19-07:00

Re: How to suppress the DOS window when executing a command?

Post by jpiquemal »

OK, i understand.
You can't modify the behaviour of that program.
Post Reply