Open a command prompt and run cmd /? First and second start /? and read both times using output help.
cmd /C starts a new Windows command process, which automatically closes due to /C when the optional command is executed at the end of the command process.
The start "" /MAX /B command starts another command process with an empty line as the window title and starts the Windows Notepad GUI process with this command, which should be started using the maximized window due to /MAX , but which should run in the background (= without a visible window) due to /b .
So the mistake is to use /b , since it really requires starting Notepad in the foreground with the maximum window, and not in the background without a window.
And Windows does not have to be installed on the C: drive in a directory named Windows . Therefore, it is better to use one of these two commands:
cmd.exe /C start "" /MAX "%SystemRoot%\System32\notepad.exe" cmd.exe /C start "" /MAX "%windir%\System32\notepad.exe"
The windir environment variable is the default environment variable starting from Windows 95 with the path to the Windows startup directory.
The SystemRoot environment variable is an environment variable predefined by all versions of Windows based on Windows NT with the path to the Windows directory.
At present, it is better to use SystemRoot , since this environment variable is built-in Windows, and windir simply predefined in the list of system environment variables and therefore can also be deleted.
See the Wikipedia article on Windows Environment Variables for a list of predefined environment variables for a description.
source share