Page 1 of 1
Hide CMD windows when running some program via Run() on windows
Posted: Mon Mar 20, 2023 6:05 pm
by amiga23
When I use the
Run() method, on windows always a CMD window is opened, while the exe called by
Run() is running. Same size and same position as opening cmd.exe.
Is there a way to suppress these windows or, minimize them, or at least have them in background?
Re: Hide CMD windows when running some program via Run() on windows
Posted: Sat Mar 25, 2023 7:45 pm
by airsoftsoftwair
It's currently not possible but I think it makes sense to add a new tag to
Run() and
Execute() which allows the suppression of that window. Until then, you can workaround the problem by simply defining a "RunOutput" event handler that catches the program's output. This should make the console window go away, e.g. like this:
Code: Select all
InstallEventHandler({RunOutput = Function(msg) EndFunction})
Run("test.exe")
Re: Hide CMD windows when running some program via Run() on windows
Posted: Mon Mar 27, 2023 5:24 pm
by amiga23
For RunOutput I do already use an EventHandler and it gets the output correctly, but still the window opens.
Re: Hide CMD windows when running some program via Run() on windows
Posted: Thu Apr 13, 2023 3:09 pm
by airsoftsoftwair
What kind of program is it that you're trying to run? There are also Windows programs which open a console by default. In that case it's impossible to suppress it. You can easily check if that's the case by running the program from cmd.exe or PowerShell. Does it open a new console or does it show its output in cmd.exe or PowerShell?
Re: Hide CMD windows when running some program via Run() on windows
Posted: Sun Aug 20, 2023 3:38 pm
by airsoftsoftwair
Code: Select all
- New [Windows]: Execute() and Run() accept a new "Hide" tag in their optional table argument now; if this
is set to TRUE, console programs on Windows won't open their console window
Re: Hide CMD windows when running some program via Run() on windows
Posted: Mon Aug 21, 2023 12:27 pm
by Juan Carlos
airsoftsoftwair wrote: ↑Sun Aug 20, 2023 3:38 pm
Code: Select all
- New [Windows]: Execute() and Run() accept a new "Hide" tag in their optional table argument now; if this
is set to TRUE, console programs on Windows won't open their console window
Good news to make a Trojan or Spyware program with Hollywood.

Re: Hide CMD windows when running some program via Run() on windows
Posted: Tue Aug 22, 2023 11:57 am
by Allanon
I don't know if the fix added will remove the black windows, I used the tool "nircmd.exe" with the syntax
Code: Select all
nircmd.exe exec hide <command_to_execute>
to hide that annoying window, you can read more about it here :
https://nircmd.nirsoft.net/exec.html
Sometimes it's tricky to hide cmd windows even with this tool.
Re: Hide CMD windows when running some program via Run() on windows
Posted: Mon Aug 28, 2023 10:42 pm
by airsoftsoftwair
Allanon wrote: ↑Tue Aug 22, 2023 11:57 am
Sometimes it's tricky to hide cmd windows even with this tool.
I think Hollywood does pretty much the same as nircmd so if nircmd can hide the window Hollywood should be able to do so too now

Of course, the window can't be hidden for programs that really enforce having a window but normally they shouldn't do that. It's a Windows thing that it always opens a console window for console program and this window can be hidden now by Hollywood.
Re: Hide CMD windows when running some program via Run() on windows
Posted: Tue Aug 29, 2023 9:40 am
by Allanon
airsoftsoftwair wrote: ↑Mon Aug 28, 2023 10:42 pm
Allanon wrote: ↑Tue Aug 22, 2023 11:57 am
Sometimes it's tricky to hide cmd windows even with this tool.
I think Hollywood does pretty much the same as nircmd so if nircmd can hide the window Hollywood should be able to do so too now

Of course, the window can't be hidden for programs that really enforce having a window but normally they shouldn't do that. It's a Windows thing that it always opens a console window for console program and this window can be hidden now by Hollywood.
Well, that's a great news! Thank you
I've fighted with those black windows for years
