I would like to know - how to start an application Maximized using a .bat file. On Windows 10 operating system. Thanks!
2 Answers
Afternoon,
You can use the following to start an application in full screen:
Inside a batch-file put the following, replace notepad.exe with the application.
start /max notepad.exe
I am unsure if this will be applicable to all applications but I have tested with notepad and MS Word.
-
3This starts an application maximised, not full-screen, as the questioner wants.AFH– AFH2018-09-27 13:28:16 +00:00Commented Sep 27, 2018 at 13:28
::to minimized
/min
::To full screen as someone asked do this ::this will press f11 to full screen or any key you need ::add a delay if happens to fast here I add 1 sec
timeout 1> Null
::you may want change directory to point to location of file you will create below
cd "%keyboardpress\fileLocation%"
::add this to bat file
wscript /nologo keyboardpress.vbs
::then open a note pad add code below and name and save it as well naturally in this example as keyboardpress.vbs
set wShell = createObject("wscript.shell") wShell.sendKeys "{F11}"
::Note: this can be used in this way a well wShell.sendKeys "a {enter}"
::this will type "a" key then the "enter" key,
/fsoption to thestartcommand. Note that if an application needs quoting then it must be preceded by a quoted window title (which can be an empty string), egstart "" "Application Name.exe"- this applies to both CMD and TCC-LE.