Is it possible to completely hide the GUI of a program that cant run silently. I have manged to get my bat files to process hidden using the solution from the link below, but some of the batches call on GUI'd programs. I dont mind third party solutions as long as they also run from cmd as I am basing my project around it.
Asked
Active
Viewed 1,956 times
3
-
What problem are you trying to solve exactly? There are ways to hide an application but it requires the source code to the application – Ramhound Oct 07 '14 at 18:54
-
I am trying to put together a AV scanning solution for my company using various scanners like Roguekiller, JunkWare Removal, MAlwarebytes, etc. Some of them already have command line switches for silent runs. – David Oct 07 '14 at 19:07
-
Here is an example of a program I cant get to run silently: http://www.bleepingcomputer.com/download/adwcleaner/. It has switches but none for silent runs – David Oct 07 '14 at 19:29
1 Answers
1
You can do something close with Autoit
The only criteria is that you must know the title of the window that you want to hide.
For example, if I wanted to open up a new notepad instance and then hide it, I could do so with this:
ShellExecute("notepad.exe") ;start notepad
WinWait("Untitled - Notepad", "") ;pause execution until window loads
WinSetState("Untitled - Notepad", "", @SW_HIDE) ;hide window
Autoit can also manipulate the controls on the window to take specific actions (eg, press buttons)
You'll still see it pop up briefly, though - so it won't be truly silent.
MaQleod
- 13,149
- 4
- 40
- 61
-
Excellent. This seems like it will do the trick. Changed SW_SHOW to SW_HIDE. Will see how far I can take this with my batch files and related programs. The "convert to exe" feature will be golden for portability and remote deployment. Thank you – David Oct 07 '14 at 20:41
-
right, it was supposed to be hide, I copied that line from after I brought my window back and forgot to change it - editing the answer to correctly reflect that. – MaQleod Oct 07 '14 at 21:27