-2

An exe I am trying to run takes a lot of time to load.

Is there any way I can hide the window (as if it wasn't active) after its the initial startup and (re-)show it when the user executes a command and again hide it when the user executes another command?

The command shall be described using a bat file.

P.S. I want to .bat file to be independent of any scripting framework.

Compo
  • 36,585
  • 5
  • 27
  • 39
  • This is not a 'how to' type of site. this is a What's wrong with my code site. You've shown no code with any type of effort to achieve your goal See: https://stackoverflow.com/help/how-to-ask and https://stackoverflow.com/help/on-topic. Show research eg: I've tried x,y,z, but they aren't suitable because... – T3RR0R Jan 10 '20 at 13:35
  • @T3RR0R So which StackExchange site am I suppose to be using? – Steve Wozniak Jan 10 '20 at 13:47
  • SuperUser may be better suited to the type of question, but I'd still recommend doing some research / explaining in your question what you've tried or ruled out. – T3RR0R Jan 10 '20 at 13:50
  • Hmm...Do you have any solution to my problem? – Steve Wozniak Jan 10 '20 at 13:51
  • https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-waitforinputidle but can't be done in batch. –  Jan 10 '20 at 17:09

1 Answers1

0

One solution for you to try, discovered with less than a minutes googling. The purpose of providing detail in your question is to demonstrate effort on your part, and to rule out suggestions that have been tried and failed. Something to keep in mind for future questions.

use start /min to launch your .exe minimized. read the help in cmd.exe for:

Start /?

use the batch mentioned here to maximize it when appropriate using the command as explained in that answer.

T3RR0R
  • 2,747
  • 3
  • 10
  • 25