-1

On Windows 11 there are several GUI programs (for example, the jzIntv emulator) that I use which open a console window in the background, in addition to the main GUI window. Is there some method or utility I can use that will enable running and showing the GUI, but hiding the console window?

I have tried using NirCmd (exec and/or execmd commands) with limited success. I find for some programs this works (e.g. execmd works for Mame), but for most apps (e.g. jzIntv) it will hide both the GUI and the console windows, which is not what I want.

Example screenshot of both windows

Ramhound
  • 41,734
  • 35
  • 103
  • 130
  • Why did you delete your original question instead of editing your question allowing it to be reopened. – Ramhound Jan 01 '23 at 20:17
  • @Ramhound I did exactly that and it did not get re-opened. I did not know if it ever would. The comment on the blocking messages said "You can edit the question or post a new one" ... if you don't think this was good advice then you should take it up with the site host. – Paul Galbraith Jan 03 '23 at 16:19
  • When it says "ask a new question" it actually means asking an entirely different question not submitting the same question. You likely didn't give the community enough time to reopen it. – Ramhound Jan 03 '23 at 16:24
  • @Ramhound, maybe that's what was meant, maybe not, but it's definitely not what was said. The entrenched communities on these sites are very quick to condemn and slow to praise, I waited 3 times as long as it took to close my question before giving up and posting a new one. – Paul Galbraith Jan 03 '23 at 18:46

2 Answers2

0
  1. Make a .bat file to run the app.
  2. Make a shortcut to the .bat file.
  3. Open the shortcut the Properties.
  4. Set Run to Minimized.

Now, when you click the shortcut, or call it through the the keyboard, the CMD prompt will be hidden, but the app it's running should show normally.

DrMoishe Pippik
  • 25,661
  • 4
  • 36
  • 54
  • Thanks for this suggestion, I have no doubt this is a good solution for many, but I am looking for something that will work when called from another program or batch file, and I don't think you can do that with shortcuts. – Paul Galbraith Jan 02 '23 at 16:32
  • Yes, you *can* call a shortcut from another application. For example, in *Clavier+*, I use "C:\Users\UserName\AppData\Roaming\Microsoft\Windows\Start Menu\SIFirefox.bat.lnk" to call the link directly, not it's destination. Note use of **.lnk** at end. – DrMoishe Pippik Jan 02 '23 at 19:17
0

Although I'm at least 99% certain this didn't work for me yesterday (the GUI window never appeared), today this approach is working for me, maybe a reboot was all I needed to sort out this approach using NirCmd:

nircmd execmd ./path/to/program.exe <param1> <param2>

The console now remains hidden while the GUI window appears as desired.