

InterviewSolution
Saved Bookmarks
1. |
Solve : need batch file code to start a program minimized, "start /b /min" does not work? |
Answer» <html><body><p>my .bat file code:<br/><br/>start /b /min C:\"Program Files (x86)\<a href="https://interviewquestions.tuteehub.com/tag/aim-852223" style="font-weight:bold;" target="_blank" title="Click to know more about AIM">AIM</a>\aim.exe"<br/>start /b /min C:\"Program Files (x86)\Microsoft Office\OFFICE11\EXCEL.EXE"<br/><br/>result of opening the .bat:<br/>-AIM launches normally (not minimized )<br/>-Excel launches minimized<br/><br/>The obvious <a href="https://interviewquestions.tuteehub.com/tag/difference-240059" style="font-weight:bold;" target="_blank" title="Click to know more about DIFFERENCE">DIFFERENCE</a> here is that excel is MS <a href="https://interviewquestions.tuteehub.com/tag/based-389387" style="font-weight:bold;" target="_blank" title="Click to know more about BASED">BASED</a>, AIM is non-MS based...<br/>So how can I get AIM to start minimzed?problem 'semi-resolved' using .au3 files with AutoItV3EDIT:<br/><br/>To anyone who has a similar problem, I'm posting my <a href="https://interviewquestions.tuteehub.com/tag/solution-25781" style="font-weight:bold;" target="_blank" title="Click to know more about SOLUTION">SOLUTION</a>. Had to use force codes as AIM does not follow Windows API (required AutoItV3). Timer delay followed by an additional set state command was needed because the program would simply restore itself from the taskbar after a certain amount of time (). If anyone could actually help me write a code without the use of a timer delay, that would be great (: (like minimize after the program restores itself)<br/><br/> Code: <a>[<a href="https://interviewquestions.tuteehub.com/tag/select-630282" style="font-weight:bold;" target="_blank" title="Click to know more about SELECT">SELECT</a>]</a>Run("C:\Program Files (x86)\AIM\aim.exe", "", SW_MINIMIZE)<br/>WinWait("AIM")<br/>WinSetState("AIM", "", SW_MINIMIZE)<br/>Sleep(5000)<br/>WinSetState("AIM", "", SW_MINIMIZE)</p></body></html> | |