Hide CMD windows when running some program via Run() on windows
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Hide CMD windows when running some program via Run() on windows
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
For RunOutput I do already use an EventHandler and it gets the output correctly, but still the window opens.
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Hide CMD windows when running some program via Run() on windows
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?
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Hide CMD windows when running some program via Run() on windows
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
- Juan Carlos
- Posts: 891
- Joined: Mon Sep 06, 2010 1:02 pm
Re: Hide CMD windows when running some program via Run() on windows
Good news to make a Trojan or Spyware program with Hollywood.airsoftsoftwair wrote: ↑Sun Aug 20, 2023 3:38 pmCode: 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
I don't know if the fix added will remove the black windows, I used the tool "nircmd.exe" with the syntax 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.
Code: Select all
nircmd.exe exec hide <command_to_execute>
https://nircmd.nirsoft.net/exec.html
Sometimes it's tricky to hide cmd windows even with this tool.
----------------------------
[Allanon] Fabio Falcucci | GitHub for recent works | Support me on Patreon for Hollywood libraries | ☆★ All my links ★☆
[Allanon] Fabio Falcucci | GitHub for recent works | Support me on Patreon for Hollywood libraries | ☆★ All my links ★☆
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Hide CMD windows when running some program via Run() on windows
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
Well, that's a great news! Thank youairsoftsoftwair wrote: ↑Mon Aug 28, 2023 10:42 pmI 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.
I've fighted with those black windows for years
----------------------------
[Allanon] Fabio Falcucci | GitHub for recent works | Support me on Patreon for Hollywood libraries | ☆★ All my links ★☆
[Allanon] Fabio Falcucci | GitHub for recent works | Support me on Patreon for Hollywood libraries | ☆★ All my links ★☆