As an IT administrator, it is often necessary to run programs and scripts from the command line in Windows. This can be done in a few different ways depending on the program and the version of Windows you are running.
The first way to invoke a program from the command line is to use the ‘start’ command. This command is available in all versions of Windows, and it can be used to open any program that is installed on the computer. To use the ‘start’ command, you would type in the full path to the program you want to open, for example ‘start C:\\Program Files\\MyProgram\\MyProgram.exe’. This command can also be used to open a document or a website, for example ‘start https://www.example.com’.
The second way to invoke a program is to use the ‘run’ command. This command is available in Windows XP and later versions, and it can be used to open any program that is installed on the computer. To use the ‘run’ command, you would type in the full path to the program you want to open, for example ‘run C:\\Program Files\\MyProgram\\MyProgram.exe’. This command can also be used to open a document or a website, for example ‘run https://www.example.com’.
The third way to invoke a program is to use the ‘call’ command. This command is available in Windows Vista and later versions, and it can be used to open any program that is installed on the computer. To use the ‘call’ command, you would type in the full path to the program you want to open, for example ‘call C:\\Program Files\\MyProgram\\MyProgram.exe’. This command can also be used to open a document or a website, for example ‘call https://www.example.com’.
The fourth way to invoke a program is to use the ‘shell’ command. This command is available in Windows 7 and later versions, and it can be used to open any program that is installed on the computer. To use the ‘shell’ command, you would type in the full path to the program you want to open, for example ‘shell C:\\Program Files\\MyProgram\\MyProgram.exe’. This command can also be used to open a document or a website, for example ‘shell https://www.example.com’.
The fifth way to invoke a program is to use the ‘open’ command. This command is available in Windows 8 and later versions, and it can be used to open any program that is installed on the computer. To use the ‘open’ command, you would type in the full path to the program you want to open, for example ‘open C:\\Program Files\\MyProgram\\MyProgram.exe’. This command can also be used to open a document or a website, for example ‘open https://www.example.com’.
In summary, as an IT administrator, you can invoke programs from the command line in Windows in a few different ways depending on the version of Windows you are running. The ‘start’, ‘run’, ‘call’, ‘shell’ and ‘open’ commands can all be used to open programs, documents or websites from the command line.