# PackageCompiler EXE-File: How suppress extra DOS-Window beside GUI-Window (Gtk4)

**URL:** <https://discourse.julialang.org/t/packagecompiler-exe-file-how-suppress-extra-dos-window-beside-gui-window-gtk4/94846>\
**Category:** General Usage\
**Created:** [February 18, 2023, 6:22pm UTC](https://discourse.julialang.org/t/packagecompiler-exe-file-how-suppress-extra-dos-window-beside-gui-window-gtk4/94846 "2023-02-18T18:22:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ralf\_Dietrich](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ralf_dietrich/32/5643_2.png) [@Ralf\_Dietrich](https://discourse.julialang.org/u/Ralf_Dietrich)\
**Post date:** [February 18, 2023, 6:22pm UTC](https://discourse.julialang.org/t/packagecompiler-exe-file-how-suppress-extra-dos-window-beside-gui-window-gtk4/94846/1 "2023-02-18T18:22:37Z")

</div>

Hello guys

am experimenting with PackageCompiler at the moment and so far have always created EXE files that only run in a DOS window. This works so far also quite well.

But now I have created a small GUI application with Gtk4 which does not work as expected.

After executing the EXE file the GUI works (a window with different widgets opens) but in addition the application always starts with a DOS window, which is undesirable in my case.

Who can help me there. Glad about every idea

PS: The question that also arises for me, is this typical behavior or is it more because I am doing something wrong?

---

<div class="post-metadata">

**Author:** ![Ralf\_Dietrich](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ralf_dietrich/32/5643_2.png) [@Ralf\_Dietrich](https://discourse.julialang.org/u/Ralf_Dietrich)\
**Post date:** [February 19, 2023, 12:24pm UTC](https://discourse.julialang.org/t/packagecompiler-exe-file-how-suppress-extra-dos-window-beside-gui-window-gtk4/94846/2 "2023-02-19T12:24:10Z")

</div>

More Details:

I compiled this:

```julia
module MusterGUIAppEXE

using Gtk4

function julia_main()
    win = GtkWindow("My First Gtk4 Program", 400, 200)
    b = GtkButton(label="Click Me!", visible=true)
    push!(win, b)
    visible(win, true)
    if !isinteractive()
        c = Condition()
        signal_connect(win, :close_request) do widget
            notify(c)
        end
        @async Gtk4.GLib.glib_main()
        wait(c)
    end
end

end

```

create the .exe File via

`using PackageCompiler`

`create_app("MusterGUIAppEXE", "MusterGUIAppEXECompiled")`

---

<div class="post-metadata">

**Author:** ![Ralf\_Dietrich](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ralf_dietrich/32/5643_2.png) [@Ralf\_Dietrich](https://discourse.julialang.org/u/Ralf_Dietrich)\
**Post date:** [February 19, 2023, 12:58pm UTC](https://discourse.julialang.org/t/packagecompiler-exe-file-how-suppress-extra-dos-window-beside-gui-window-gtk4/94846/3 "2023-02-19T12:58:35Z")

</div>

I have in the meantime found a dirty solution that works for me.

Maybe it will help someone:

From this website I downloaded the tool `nircmd.exe ` (I take no responsibility) [NirCmd - Windows command line tool](https://www.nirsoft.net/utils/nircmd.html) and put it into the /bin directory where the compiled EXE file is located.

Then I created a shortcut of the EXE file in the /bin folder and entered the following under properties: `nircmd.exe execmd K:\yourpath\bin\MusterGUIAppEXE.exe`

If I now start the program via the shortcut, the console window is completely suppressed and only the GUI window is displayed.
