3

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.

Run a batch file in a completely hidden way

David
  • 149

1 Answers1

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,258